Example to trigger only on new tag
This commit is contained in:
parent
58fb585edd
commit
53acad1bef
26
README.md
26
README.md
|
@ -52,7 +52,31 @@ jobs:
|
||||||
|
|
||||||
> **IMPORTANT**: note the `Unshallow` step. It is required for the changelog to work correctly.
|
> **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
|
## Customizing
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue