Build and Release #39
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: Build and Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.label }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: windows-latest | |
| label: windows-x64 | |
| artifact_name: VideoMergingTool-windows-x64 | |
| package_path: dist/installer/VideoMergingTool-Setup.exe | |
| - os: macos-15-intel | |
| label: macos-intel | |
| artifact_name: VideoMergingTool-macos-intel | |
| package_path: dist/VideoMergingTool-macos-intel.dmg | |
| - os: macos-14 | |
| label: macos-apple-silicon | |
| artifact_name: VideoMergingTool-macos-apple-silicon | |
| package_path: dist/VideoMergingTool-macos-apple-silicon.dmg | |
| - os: ubuntu-latest | |
| label: linux-x64 | |
| artifact_name: VideoMergingTool-linux-x64 | |
| package_path: dist/VideoMergingTool | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install build dependencies | |
| run: python -m pip install -r requirements-build.txt | |
| - name: Install Inno Setup on Windows | |
| if: runner.os == 'Windows' | |
| run: choco install innosetup --no-progress -y | |
| - name: Build executable on Windows | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| env: | |
| WINDOWS_CERTIFICATE_BASE64: ${{ secrets.WINDOWS_CERTIFICATE_BASE64 }} | |
| WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }} | |
| run: .\scripts\build_windows.ps1 | |
| - name: Build app on macOS | |
| if: runner.os == 'macOS' | |
| run: | | |
| bash scripts/build_local.sh | |
| mv dist/VideoMergingTool.dmg "${{ matrix.package_path }}" | |
| - name: Build executable on Linux | |
| if: runner.os == 'Linux' | |
| run: bash scripts/build_local.sh | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact_name }} | |
| path: ${{ matrix.package_path }} | |
| if-no-files-found: error | |
| - name: Upload release asset | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: ${{ matrix.package_path }} | |
| generate_release_notes: true |