Release 0.9.0 #13
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 | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6.4.0 | |
| with: | |
| go-version-file: "go.mod" | |
| cache: true | |
| - name: Extract release notes | |
| run: | | |
| version="${GITHUB_REF#refs/tags/v}" | |
| awk "/^## ${version} /{found=1; next} /^## /{found=0} found" CHANGELOG.md > /tmp/release-notes.md | |
| - name: Mint homebrew-tap token | |
| id: tap_token | |
| uses: actions/create-github-app-token@v3.2.0 | |
| with: | |
| app-id: ${{ secrets.HOMEBREW_TAP_APP_ID }} | |
| private-key: ${{ secrets.HOMEBREW_TAP_APP_PRIVATE_KEY }} | |
| owner: dnsimple | |
| repositories: homebrew-tap | |
| - name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@v7.2.1 | |
| with: | |
| version: "~> v2" | |
| args: release --clean --release-notes /tmp/release-notes.md | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| HOMEBREW_TAP_GITHUB_TOKEN: ${{ steps.tap_token.outputs.token }} | |
| - name: Publish public release assets to homebrew-tap | |
| env: | |
| GH_TOKEN: ${{ steps.tap_token.outputs.token }} | |
| run: | | |
| tag="${GITHUB_REF#refs/tags/}" | |
| dist="dist" | |
| gh release create "${tag}" \ | |
| --repo dnsimple/homebrew-tap \ | |
| --title "${tag}" \ | |
| --notes-file /tmp/release-notes.md | |
| gh release upload "${tag}" \ | |
| --repo dnsimple/homebrew-tap \ | |
| "${dist}"/*.tar.gz "${dist}"/*.zip "${dist}"/checksums.txt |