Merge pull request #140 from Sammy-T/dependabot/github_actions/action… #37
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/Release | |
| on: | |
| workflow_dispatch: # Allow manual triggering | |
| push: | |
| tags: | |
| - 'v*.*.*' # Trigger on pushing version tags | |
| jobs: | |
| # Build the app | |
| build: | |
| strategy: | |
| matrix: | |
| os: [macos-latest, ubuntu-latest, windows-latest] | |
| include: | |
| - os: macos-latest | |
| os-base: mac | |
| - os: ubuntu-latest | |
| os-base: linux | |
| - os: windows-latest | |
| os-base: windows | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6.0.2 | |
| - name: Install Linux dependencies | |
| if: matrix.os == 'ubuntu-latest' | |
| run: sudo apt-get update && sudo apt install libgtk-3-dev libwebkit2gtk-4.1-dev | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4.0.2 | |
| # Pre-install & Pre-build the frontend to make sure the | |
| # necessary frontend resources are available when the Wails build starts | |
| - name: Pre-install frontend | |
| working-directory: frontend | |
| run: npm install | |
| - name: Pre-build frontend | |
| working-directory: frontend | |
| run: npm run build | |
| - name: Set up Go | |
| uses: actions/setup-go@v6.4.0 | |
| with: | |
| go-version-file: 'go.mod' | |
| - name: Install Wails CLI | |
| run: go install github.com/wailsapp/wails/v2/cmd/wails@latest | |
| - name: Check Wails requirements | |
| run: wails doctor | |
| - name: Read output file name from wails.json | |
| id: filename | |
| uses: notiz-dev/github-action-json-property@v0.2.0 | |
| with: | |
| path: 'wails.json' | |
| prop_path: 'outputfilename' | |
| - name: Create release directory | |
| run: mkdir -p release | |
| - name: Build Wails app | |
| if: matrix.os != 'ubuntu-latest' | |
| run: wails build | |
| - name: Build Wails app (Linux) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: wails build -tags webkit2_41 | |
| - name: Zip release file | |
| uses: vimtor/action-zip@v1.3 | |
| with: | |
| files: build/bin | |
| recursive: false | |
| dest: release/${{ steps.filename.outputs.prop }}_${{ matrix.os-base }}.zip | |
| - name: Upload Build Artifact | |
| uses: actions/upload-artifact@v7.0.1 | |
| with: | |
| name: ${{ steps.filename.outputs.prop }}_${{ matrix.os-base }} | |
| path: release/ | |
| retention-days: 7 | |
| # Create a release | |
| release: | |
| if: startsWith(github.ref_name, 'v') | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download Build Artifact | |
| uses: actions/download-artifact@v4.1.8 | |
| with: | |
| path: release/ | |
| merge-multiple: true | |
| - name: Release | |
| uses: softprops/action-gh-release@v3.0.0 | |
| with: | |
| name: ${{ github.ref_name }} | |
| tag_name: ${{ github.ref_name }} | |
| draft: true | |
| files: release/* |