Skip to content

cleanup CI

cleanup CI #25

Workflow file for this run

name: Create release
on:
push:
branches: [ "master" ]
tags:
- 'v*'
pull_request:
branches: [ "master" ]
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Qt via install-qt-action
uses: jurplel/install-qt-action@v4
with:
version: '6.9'
host: linux
target: desktop
cache: true
- name: Configure CMake
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
- name: Build
run: cmake --build build --config ${{ env.BUILD_TYPE }}
- name: Test
working-directory: build
run: ctest -C ${{ env.BUILD_TYPE }}
- name: Upload build artifact
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-artifact@v4
with:
name: memsc-artifacts
path: |
build/memsc
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: memsc-artifacts
- name: Package artifacts
run: |
mkdir -p release
cp memsc release/ || echo "Warning: memsc not found"
tar czf memsc-${{ github.ref_name }}.tar.gz release
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Release Asset
uses: softprops/action-gh-release@v2
with:
files: memsc-${{ github.ref_name }}.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}