1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-11-29 23:07:42 +02:00

docs: update actions doc

This commit is contained in:
Carlos A Becker
2022-04-11 09:35:03 -03:00
parent 0edd69a47e
commit e60965ecd3

View File

@@ -16,11 +16,15 @@ Below is a simple snippet to use this action in your workflow:
name: goreleaser
on:
pull_request:
push:
# run only against tags
tags:
- '*'
permissions:
contents: write
# packages: write
# issues: write
jobs:
goreleaser:
@@ -65,31 +69,6 @@ jobs:
For more information, take a look at
[actions/checkout#290](https://github.com/actions/checkout/issues/290).
### Run on new tag
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@v2
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
!!! tip
For detailed instructions please follow GitHub Actions [workflow syntax][syntax].
@@ -141,6 +120,15 @@ Following inputs can be used as `step.with` keys
[^1]: Can be a fixed version like `v0.117.0` or a max satisfying SemVer one like `~> 0.132`. In this case this will return `v0.132.1`.
### Outputs
Following outputs are available
| Name | Type | Description |
|-------------------|---------|---------------------------------------|
| `artifacts` | JSON | Build result artifacts |
| `metadata` | JSON | Build result metadata |
### Environment Variables
Following environment variables can be used as `step.env` keys