diff --git a/README.md b/README.md index 622bfef..24e5092 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,31 @@ jobs: > **IMPORTANT**: note the `Unshallow` step. It is required for the changelog to work correctly. -> If you want to run GoReleaser only on new tag, check [this comment](https://github.com/goreleaser/goreleaser-action/issues/61#issuecomment-569286582). +If you want to run GoReleaser only on new tag, you can use this event: + +```yaml +on: + push: + tags: + - '*' +``` + +Or with a condition on GoReleaser step: + +```yaml + - + name: Run GoReleaser + uses: goreleaser/goreleaser-action@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + version: latest + args: release --rm-dist + key: ${{ secrets.YOUR_PRIVATE_KEY }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +``` + +> For detailed instructions please follow GitHub Actions [workflow syntax][syntax]. ## Customizing