chore: release v1.5.0 #62
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| packages: write | |
| jobs: | |
| goreleaser: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| - name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@v6 | |
| with: | |
| distribution: goreleaser | |
| version: latest | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
| build-desktop: | |
| name: Build Desktop App | |
| # Run independently - don't wait for goreleaser | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| - name: Install Wails | |
| run: go install github.com/wailsapp/wails/v2/cmd/wails@latest | |
| - name: Install Linux Dependencies | |
| if: matrix.os == 'ubuntu-latest' | |
| run: sudo apt-get update && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev | |
| - name: Build Desktop App | |
| if: matrix.os == 'macos-latest' | |
| run: wails build -platform darwin/universal | |
| - name: Check Version Consistency | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| TAG_VERSION=${GITHUB_REF#refs/tags/v} | |
| CODE_VERSION=$(grep 'const Version =' cmd/root.go | cut -d '"' -f 2) | |
| if [ "$TAG_VERSION" != "$CODE_VERSION" ]; then | |
| echo "Error: Tag version ($TAG_VERSION) does not match code version ($CODE_VERSION)" | |
| exit 1 | |
| fi | |
| - name: Build Desktop App | |
| if: matrix.os != 'macos-latest' | |
| run: wails build -tags webkit2_41 | |
| - name: Rename Artifacts (Unix) | |
| if: matrix.os != 'windows-latest' | |
| run: | | |
| mkdir release-artifacts | |
| if [ "${{ matrix.os }}" = "macos-latest" ]; then | |
| # Wails builds ask-desktop.app on macOS | |
| cd build/bin | |
| zip -r ../../release-artifacts/ask-desktop-macos-universal.zip ask-desktop.app | |
| else | |
| cp build/bin/ask-desktop release-artifacts/ask-desktop-linux-amd64 | |
| fi | |
| - name: Rename Artifacts (Windows) | |
| if: matrix.os == 'windows-latest' | |
| shell: pwsh | |
| run: | | |
| mkdir release-artifacts | |
| Copy-Item build/bin/ask-desktop.exe release-artifacts/ask-desktop-windows-amd64.exe | |
| - name: Upload Release Assets | |
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: release-artifacts/* | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_PAT }} |