fix: remove if in the release action #6
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: | |
| branches: | |
| - master | |
| 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@v4 | |
| 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@v5 | |
| with: | |
| go-version: "1.24" # Match the Go version in go.mod | |
| - name: Automatic Tagging | |
| id: conventional-commits | |
| uses: webiny/action-conventional-commits@v1.3.0 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@v5 | |
| with: | |
| # GoReleaser will automatically use the latest version. | |
| # You can specify a specific version if needed. | |
| version: latest | |
| args: release --clean | |
| env: | |
| # This token is used to create the GitHub Release and upload assets. | |
| # It's automatically provided by GitHub Actions. | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # This is a personal access token with 'repo' scope, used to push | |
| # the updated formula to homebrew-email-cli repository. | |
| HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} |