updated the verison #8
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: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| env: | |
| GO_VERSION: '1.23' | |
| NODE_VERSION: '20' | |
| jobs: | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| - name: Install Wails | |
| run: go install github.com/wailsapp/wails/v2/cmd/wails@latest | |
| - name: Install Frontend Dependencies | |
| run: cd frontend && npm ci | |
| - name: Build Windows amd64 | |
| run: wails build -clean -platform windows/amd64 -ldflags="-s -w" -o volt-api-windows-amd64.exe | |
| - name: Build Windows arm64 | |
| run: wails build -clean -platform windows/arm64 -ldflags="-s -w" -o volt-api-windows-arm64.exe | |
| - name: Generate Checksums | |
| shell: pwsh | |
| run: | | |
| cd build/bin | |
| Get-ChildItem -Filter "volt-api-windows-*.exe" | ForEach-Object { | |
| $hash = Get-FileHash -Algorithm SHA256 $_.FullName | |
| $hash.Hash | Out-File -FilePath ($_.Name + ".sha256") | |
| } | |
| - name: Upload Windows Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-builds | |
| path: | | |
| build/bin/*.exe | |
| build/bin/*.sha256 | |
| build-macos: | |
| runs-on: macos-14 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| - name: Install Wails | |
| run: go install github.com/wailsapp/wails/v2/cmd/wails@latest | |
| - name: Install Frontend Dependencies | |
| run: cd frontend && npm ci | |
| - name: Build macOS arm64 | |
| env: | |
| CGO_ENABLED: 1 | |
| CC: clang | |
| CXX: clang++ | |
| run: wails build -clean -platform darwin/arm64 -ldflags="-s -w" | |
| - name: Ad-hoc Sign arm64 | |
| run: codesign --force --deep -s - build/bin/volt-api.app | |
| - name: Package arm64 | |
| run: | | |
| cd build/bin | |
| tar -czvf volt-api-macos-arm64.tar.gz volt-api.app | |
| mv volt-api-macos-arm64.tar.gz ../.. | |
| rm -rf volt-api.app | |
| - name: Build macOS amd64 | |
| env: | |
| CGO_ENABLED: 1 | |
| CC: clang | |
| CXX: clang++ | |
| run: wails build -clean -platform darwin/amd64 -ldflags="-s -w" | |
| - name: Ad-hoc Sign amd64 | |
| run: codesign --force --deep -s - build/bin/volt-api.app | |
| - name: Package amd64 | |
| run: | | |
| cd build/bin | |
| tar -czvf volt-api-macos-amd64.tar.gz volt-api.app | |
| mv volt-api-macos-amd64.tar.gz ../.. | |
| rm -rf volt-api.app | |
| - name: Generate Checksums | |
| run: | | |
| shasum -a 256 volt-api-macos-arm64.tar.gz > volt-api-macos-arm64.tar.gz.sha256 | |
| shasum -a 256 volt-api-macos-amd64.tar.gz > volt-api-macos-amd64.tar.gz.sha256 | |
| - name: Upload macOS Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-builds | |
| path: | | |
| volt-api-macos-*.tar.gz | |
| volt-api-macos-*.sha256 | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| - name: Install Linux Dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev pkg-config build-essential libayatana-appindicator3-dev | |
| - name: Install Wails | |
| run: go install github.com/wailsapp/wails/v2/cmd/wails@latest | |
| - name: Install Frontend Dependencies | |
| run: cd frontend && npm ci | |
| - name: Build Linux amd64 | |
| env: | |
| CGO_ENABLED: 1 | |
| run: wails build -clean -platform linux/amd64 -ldflags="-s -w" -tags webkit2_41 -o volt-api-linux-amd64 | |
| - name: Generate Checksums | |
| run: | | |
| cd build/bin | |
| sha256sum volt-api-linux-amd64 > volt-api-linux-amd64.sha256 | |
| - name: Upload Linux Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-builds | |
| path: | | |
| build/bin/volt-api-linux-amd64 | |
| build/bin/volt-api-linux-amd64.sha256 | |
| release: | |
| needs: [build-windows, build-macos, build-linux] | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Download All Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Flatten Directory | |
| run: | | |
| mkdir -p release | |
| find artifacts -type f -exec cp {} release/ \; | |
| ls -la release/ | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: release/* | |
| generate_release_notes: true | |
| body: | | |
| ## Installation | |
| ### Windows | |
| Download `volt-api-windows-amd64.exe` (or arm64) and run. | |
| ### macOS | |
| 1. Download the `.tar.gz` for your Mac type. | |
| 2. Extract and move to Applications. | |
| 3. Right-click → Open to bypass security warning. | |
| ### Linux | |
| 1. `chmod +x volt-api-linux-amd64` | |
| 2. `./volt-api-linux-amd64` | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |