Release #77
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: | |
| workflow_dispatch: | |
| permissions: | |
| contents: write # to create releases, tags and upload assets | |
| pull-requests: read # to read pull request titles and labels for changelog | |
| id-token: write # to sign the release | |
| jobs: | |
| goreleaser: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| # This is required to allow GoReleaser to fetch all tags | |
| # to determine the next version number. | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.26" # Match the Go version in go.mod | |
| - name: Bump version and push tag | |
| id: tag_version | |
| uses: mathieudutour/github-tag-action@v6.2 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Fetch the new tag | |
| run: git fetch --tags | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install Snapcraft | |
| run: sudo snap install snapcraft --classic | |
| - name: Clean Snapcraft cache | |
| run: | | |
| sudo rm -rf /home/runner/.cache/snapcraft || true | |
| sudo rm -rf /root/.cache/snapcraft || true | |
| sudo rm -rf ~/.cache/snapcraft || true | |
| mkdir -p /home/runner/.cache/snapcraft/download | |
| mkdir -p /home/runner/.cache/snapcraft/stage-packages | |
| chmod -R 755 /home/runner/.cache/snapcraft | |
| - name: Run GoReleaser | |
| if: steps.tag_version.outputs.new_tag | |
| uses: goreleaser/goreleaser-action@v7 | |
| with: | |
| version: latest | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} | |
| HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} | |
| SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }} |