Add GitHub Actions CI/CD, website refresh, and documentation updates #1
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 SurfManager | ||
|
Check failure on line 1 in .github/workflows/build.yml
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
| workflow_dispatch: | ||
| inputs: | ||
| platform: | ||
| description: 'Target Platform' | ||
| required: true | ||
| default: 'all' | ||
| type: choice | ||
| options: | ||
| - all | ||
| - windows-amd64 | ||
| - linux-amd64 | ||
| - macos-amd64 | ||
| - macos-arm64 | ||
| jobs: | ||
| build: | ||
| strategy: | ||
| matrix: | ||
| include: | ||
| - os: windows-latest | ||
| platform: windows/amd64 | ||
| output: SurfManager-windows-amd64.exe | ||
| name: windows-amd64 | ||
| - os: ubuntu-latest | ||
| platform: linux/amd64 | ||
| output: SurfManager-linux-amd64 | ||
| name: linux-amd64 | ||
| - os: macos-latest | ||
| platform: darwin/amd64 | ||
| output: SurfManager-darwin-amd64 | ||
| name: macos-amd64 | ||
| - os: macos-latest | ||
| platform: darwin/arm64 | ||
| output: SurfManager-darwin-arm64 | ||
| name: macos-arm64 | ||
| runs-on: ${{ matrix.os }} | ||
| if: >- | ||
| github.event_name == 'push' || | ||
| inputs.platform == 'all' || | ||
| inputs.platform == matrix.name | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| - name: Setup Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: '1.21' | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| - name: Install Wails CLI | ||
| run: go install github.com/wailsapp/wails/v2/cmd/wails@latest | ||
| # Linux dependencies | ||
| - name: Install Linux Dependencies | ||
| if: matrix.os == 'ubuntu-latest' | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev | ||
| # Build | ||
| - name: Build | ||
| run: wails build -platform ${{ matrix.platform }} -o ${{ matrix.output }} | ||
| # Upload artifact | ||
| - name: Upload Artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ matrix.output }} | ||
| path: build/bin/${{ matrix.output }}* | ||
| release: | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| steps: | ||
| - name: Download all artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| path: artifacts | ||
| - name: Display structure | ||
| run: ls -R artifacts | ||
| - name: Create Release | ||
| uses: softprops/action-gh-release@v1 | ||
| with: | ||
| files: artifacts/**/* | ||
| generate_release_notes: true | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||