mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-04-11 11:42:15 +02:00
parent
88a030ccc9
commit
73aed29f83
@ -31,6 +31,9 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
-
|
||||
name: Fetch all tags
|
||||
run: git fetch --force --tags
|
||||
-
|
||||
name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
@ -50,10 +53,18 @@ jobs:
|
||||
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
||||
```
|
||||
|
||||
!!! warning
|
||||
Note the `fetch-depth: 0` option on the `Checkout` workflow step. It is required for GoReleaser to work properly.
|
||||
!!! warning "Some things to look closely..."
|
||||
#### Fetch depthness
|
||||
Notice the `fetch-depth: 0` option on the `Checkout` workflow step.
|
||||
It is required for GoReleaser to work properly.
|
||||
Without that, GoReleaser might fail or behave incorrectly.
|
||||
|
||||
#### Tag fetching
|
||||
Notice the `git fetch --force -tags`. This is needed if you use fields like
|
||||
`TagBody`, `TagSubject` or `TagContents` in your templates.
|
||||
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:
|
||||
@ -123,14 +134,12 @@ Following inputs can be used as `step.with` keys
|
||||
| Name | Type | Default | Description |
|
||||
|------------------|---------|--------------|------------------------------------------------------------------|
|
||||
| `distribution` | String | `goreleaser` | GoReleaser distribution, either `goreleaser` or `goreleaser-pro` |
|
||||
| `version`**¹** | String | `latest` | GoReleaser version |
|
||||
| `version`[^1] | String | `latest` | GoReleaser version |
|
||||
| `args` | String | | Arguments to pass to GoReleaser |
|
||||
| `workdir` | String | `.` | Working directory (below repository root) |
|
||||
| `install-only` | Bool | `false` | Just install GoReleaser |
|
||||
|
||||
!!! info
|
||||
¹: 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`.
|
||||
[^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`.
|
||||
|
||||
### Environment Variables
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user