diff --git a/www/content/actions.md b/www/content/actions.md index 9f6f0959a..de70b3389 100644 --- a/www/content/actions.md +++ b/www/content/actions.md @@ -46,6 +46,30 @@ jobs: > **IMPORTANT**: note the `Unshallow` workflow step. It is required for the > changelog to work correctly. +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