mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-02-09 13:36:56 +02:00
docs: run only on new tag note on github actions (#1306)
* docs: run only on new tag note on github actions * Complete example
This commit is contained in:
parent
1b04c6517a
commit
b367abd785
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user