Fix Error #7
Workflow file for this run
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: Create GitHub Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| build-win-x64: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install dependencies | |
| run: | | |
| git clone https://github.com/microsoft/vcpkg.git | |
| .\vcpkg\bootstrap-vcpkg.bat | |
| .\vcpkg\vcpkg install libsndfile wxwidgets | |
| - name: Build | |
| run: | | |
| cmake . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake | |
| cmake --build build --config Release | |
| Copy-Item -Path i18n -Destination build/dist/i18n -Recurse | |
| shell: pwsh | |
| - name: Extract version from tag | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
| - name: Zip Windows binary | |
| run: | | |
| Compress-Archive -Path build/dist/* -DestinationPath bmhelper_${{ env.VERSION }}_win-x64.zip | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bmhelper_${{ env.VERSION }}_win-x64 | |
| path: bmhelper_${{ env.VERSION }}_win-x64.zip | |
| build-mac-x64: | |
| runs-on: macos-13 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install dependencies | |
| run: | | |
| brew update | |
| brew install libsndfile wxwidgets | |
| - name: Build | |
| run: | | |
| cmake . -B build -DCMAKE_BUILD_TYPE=Release | |
| cmake --build build --config Release | |
| - name: Create .app bundle | |
| run: | | |
| mkdir -p "Be-Music Helper.app/Contents/MacOS" | |
| mkdir -p "Be-Music Helper.app/Contents/Resources" | |
| cp Resources/info.plist "Be-Music Helper.app/Contents/info.plist" | |
| cp Resources/bmhelper.icns "Be-Music Helper.app/Contents/Resources/bmhelper.icns" | |
| cp build/dist/bmhelper "Be-Music Helper.app/Contents/MacOS/bmhelper" | |
| cp -r i18n "Be-Music Helper.app/Contents/MacOS/i18n" | |
| - name: Extract version from tag | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
| - name: Create DMG | |
| run: | | |
| mkdir -p dmg-root | |
| ln -s /Applications dmg-root/Applications | |
| cp -R "Be-Music Helper.app" dmg-root/ | |
| hdiutil create -volname BMHelper \ | |
| -srcfolder dmg-root \ | |
| -ov -format UDZO bmhelper_${{ env.VERSION }}_mac-x64.dmg | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bmhelper_${{ env.VERSION }}_mac-x64 | |
| path: bmhelper_${{ env.VERSION }}_mac-x64.dmg | |
| release: | |
| needs: [build-win-x64, build-mac-x64] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Extract version from tag | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
| - name: Download Windows Artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: bmhelper_${{ env.VERSION }}_win-x64 | |
| path: artifacts/ | |
| - name: Download mac-x64 Artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: bmhelper_${{ env.VERSION }}_mac-x64 | |
| path: artifacts/ | |
| - name: Download mac-arm Artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: bmhelper_${{ env.VERSION }}_mac-arm | |
| path: artifacts/ | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ env.VERSION }} | |
| name: BMHelper ${{ env.VERSION }} | |
| body: | | |
| TBD | |
| files: | | |
| artifacts/bmhelper_${{ env.VERSION }}_win-x64.zip | |
| artifacts/bmhelper_${{ env.VERSION }}_mac-x64.dmg |