Set proper release title in GitHub Actions workflow #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| push: | |
| branches: [master] | |
| tags: ['v*'] | |
| pull_request: | |
| branches: [master] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install ccache | |
| uses: hendrikmuhs/ccache-action@v1 | |
| with: | |
| key: ${{ runner.os }}-ccache | |
| - name: Configure | |
| run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
| - name: Build | |
| run: cmake --build build --config Release | |
| - name: Collect artifacts (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| mkdir -p artifacts-vst3 artifacts-au | |
| for dir in build/*/; do | |
| found=$(find "$dir" -maxdepth 1 -name "*_artefacts" -type d 2>/dev/null) | |
| [ -z "$found" ] && continue | |
| release_dir="$found/Release" | |
| if [ -d "$release_dir/VST3" ]; then | |
| cp -R "$release_dir/VST3"/*.vst3 artifacts-vst3/ 2>/dev/null || true | |
| fi | |
| if [ -d "$release_dir/AU" ]; then | |
| cp -R "$release_dir/AU"/*.component artifacts-au/ 2>/dev/null || true | |
| fi | |
| done | |
| - name: Collect artifacts (Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Force -Path artifacts-vst3 | |
| Get-ChildItem -Path build -Recurse -Filter "*.vst3" -Directory | ForEach-Object { | |
| Copy-Item -Path $_.FullName -Destination artifacts-vst3 -Recurse -Force | |
| } | |
| - name: Upload VST3 artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: smartelectronix-${{ runner.os }}-VST3 | |
| path: artifacts-vst3/ | |
| - name: Upload AU artifacts | |
| if: runner.os == 'macOS' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: smartelectronix-macOS-AU | |
| path: artifacts-au/ | |
| release: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: all-artifacts | |
| - name: Zip artifacts | |
| run: | | |
| cd all-artifacts | |
| for dir in */; do | |
| (cd "$dir" && zip -r "../../${dir%/}.zip" .) | |
| done | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: Smartelectronix Plugins ${{ github.ref_name }} | |
| files: '*.zip' | |
| generate_release_notes: true |