Release #5
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: | |
| push: | |
| branches: | |
| - main | |
| paths: [ .bumper/versions.toml ] | |
| jobs: | |
| release-cli: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| # So we can push tags | |
| contents: write | |
| # For keyless signing with cosign | |
| id-token: write | |
| env: | |
| BUMPER_GROUP: bumper | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Mise | |
| uses: jdx/mise-action@be3be2260bc02bc3fbf94c5e2fed8b7964baf074 # v3.4.0 | |
| with: | |
| install: true | |
| cache: true | |
| env: false | |
| - name: Set up Bun | |
| run: bun install | |
| - name: Prepare cache keys | |
| run: mise run gha:pre-cache | |
| - name: Cache Go modules and build cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | |
| with: | |
| key: ${{ env.GH_CACHE_GO_KEY }} | |
| restore-keys: | | |
| ${{ env.GH_CACHE_GO_KEY }} | |
| ${{ env.GH_CACHE_GO_KEY_PARTIAL }} | |
| path: | | |
| ${{ env.GOCACHE }} | |
| ${{ env.GOMODCACHE }} | |
| - name: Set up env | |
| run: | | |
| notes_file="$(mktemp)" | |
| bumper_version="$(mise bumper latest)" | |
| echo "BUMPER_GROUP_VERSION=$bumper_version" >> $GITHUB_ENV | |
| echo "GORELEASER_CURRENT_TAG=v$bumper_version" >> $GITHUB_ENV | |
| echo "RELEASE_NOTES_FILE=$notes_file" >> $GITHUB_ENV | |
| mise bumper cat --version "$bumper_version" > "$notes_file" | |
| - name: Create and push tag | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git tag "${GORELEASER_CURRENT_TAG}" | |
| git push origin "${GORELEASER_CURRENT_TAG}" | |
| - name: Install cosign | |
| uses: sigstore/cosign-installer@7e8b541eb2e61bf99390e1afd4be13a184e9ebc5 # v3.10.1 | |
| - name: goreleaser | |
| uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0 | |
| with: | |
| version: "~> v2" | |
| args: --release-notes=${{ env.RELEASE_NOTES_FILE }} --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |