Skip to content

Commit

Permalink
Example to trigger only on new tag
Browse files Browse the repository at this point in the history
  • Loading branch information
crazy-max committed Jan 20, 2020
1 parent 58fb585 commit 53acad1
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 53acad1

Please sign in to comment.