name: Desktop Release on: push: tags: - 'v*.*.*' workflow_dispatch: permissions: contents: write jobs: build: name: Build ${{ matrix.platform }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: include: - os: ubuntu-latest platform: linux artifact: mining-dashboard - os: windows-latest platform: windows artifact: mining-dashboard.exe - os: macos-latest platform: darwin artifact: mining-dashboard steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Go uses: actions/setup-go@v5 with: go-version: '1.23' - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: '20' - name: Install Wails CLI run: go install github.com/wailsapp/wails/v3/cmd/wails3@latest - name: Install Linux dependencies if: matrix.platform == 'linux' run: | sudo apt-get update sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev - name: Install Task uses: arduino/setup-task@v2 with: version: 3.x - name: Build Desktop App working-directory: cmd/desktop/mining-desktop env: PLATFORM: ${{ matrix.platform }} run: | task ${PLATFORM}:build PRODUCTION=true - name: Create macOS App Bundle if: matrix.platform == 'darwin' working-directory: cmd/desktop/mining-desktop run: task darwin:create:app:bundle - name: Upload Artifact uses: actions/upload-artifact@v4 with: name: mining-dashboard-${{ matrix.platform }} path: | cmd/desktop/mining-desktop/bin/${{ matrix.artifact }} cmd/desktop/mining-desktop/bin/*.app release: name: Create Release needs: build runs-on: ubuntu-latest if: github.ref_type == 'tag' steps: - name: Download all artifacts uses: actions/download-artifact@v4 with: path: artifacts - name: Prepare release assets run: | mkdir -p release cp artifacts/mining-dashboard-linux/mining-dashboard release/mining-dashboard-linux-amd64 chmod +x release/mining-dashboard-linux-amd64 cp artifacts/mining-dashboard-windows/mining-dashboard.exe release/mining-dashboard-windows-amd64.exe cp artifacts/mining-dashboard-darwin/mining-dashboard release/mining-dashboard-darwin-amd64 chmod +x release/mining-dashboard-darwin-amd64 - name: Create Release uses: softprops/action-gh-release@v2 with: files: release/* generate_release_notes: true append_body: true body: | ## Desktop App Downloads | Platform | Download | |----------|----------| | Linux | `mining-dashboard-linux-amd64` | | Windows | `mining-dashboard-windows-amd64.exe` | | macOS | `mining-dashboard-darwin-amd64` |