mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-17 20:47:50 +02:00
docs: update
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
parent
86b3c943d0
commit
3353bba5aa
@ -28,7 +28,7 @@ goreleaser build [flags]
|
||||
-o, --output string Copy the binary to the path after the build. Only taken into account when using --single-target and a single id (either with --id or if configuration only has one build)
|
||||
-p, --parallelism int Number of tasks to run concurrently (default: number of CPUs)
|
||||
--single-target Builds only for current GOOS and GOARCH, regardless of what's set in the configuration file
|
||||
--skip strings Skip the given options (valid options are: after, before, post-hooks, pre-hooks, validate)
|
||||
--skip strings Skip the given options (valid options are: after, before, before-publish, post-hooks, pre-hooks, validate)
|
||||
--snapshot Generate an unversioned snapshot build, skipping all validations
|
||||
--timeout duration Timeout to the entire build process (default 30m0s)
|
||||
```
|
||||
|
@ -27,7 +27,7 @@ goreleaser release [flags]
|
||||
--release-notes string Load custom release notes from a markdown file (will skip GoReleaser changelog generation)
|
||||
--release-notes-tmpl string Load custom release notes from a templated markdown file (overrides --release-notes)
|
||||
--single-target Builds only for current GOOS and GOARCH, regardless of what's set in the configuration file (implies --skip=publish) (Pro only)
|
||||
--skip strings Skip the given options (valid options are: after, announce, archive, aur, before, chocolatey, dmg, docker, dockerhub, fury, homebrew, ko, msi, nfpm, nix, notarize, publish, sbom, scoop, sign, snapcraft, validate, winget)
|
||||
--skip strings Skip the given options (valid options are: after, announce, archive, aur, before, before-publish, chocolatey, dmg, docker, dockerhub, fury, homebrew, ko, msi, nfpm, nix, notarize, publish, sbom, scoop, sign, snapcraft, validate, winget)
|
||||
--snapshot Generate an unversioned snapshot release, skipping all validations and without publishing any artifacts (implies --skip=announce,publish,validate)
|
||||
--split Split the build so it can be merged and published later (implies --prepare) (Pro only)
|
||||
--timeout duration Timeout to the entire release process (default 30m0s)
|
||||
|
71
www/docs/customization/beforepublish.md
Normal file
71
www/docs/customization/beforepublish.md
Normal file
@ -0,0 +1,71 @@
|
||||
# Before Publish Hooks
|
||||
|
||||
> Since v2.1 (Pro).
|
||||
|
||||
!!! success "GoReleaser Pro"
|
||||
|
||||
DockerHub is a [GoReleaser Pro feature](/pro/).
|
||||
|
||||
You can use the `before_publish` hooks to run command against artifacts before
|
||||
the publishing step kicks in.
|
||||
|
||||
This should allow you to run it through a scanner, for example, or do pretty
|
||||
much anything else you need.
|
||||
|
||||
It'll run as the last step before the `publish` phase kicks in when running
|
||||
`goreleaser release`, and after the `build` phase when running
|
||||
`goreleaser build`.
|
||||
|
||||
Here's the list of options available:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yaml
|
||||
before_publish:
|
||||
- # IDs of the artifacts to filter for.
|
||||
#
|
||||
# If `artifacts` is checksum or source, this fields has no effect.
|
||||
#
|
||||
# Default: no filter.
|
||||
ids:
|
||||
- foo
|
||||
- bar
|
||||
|
||||
# Which artifacts to filter for.
|
||||
#
|
||||
# Valid options are:
|
||||
# - checksum: checksum files
|
||||
# - source: source archive
|
||||
# - package: Linux packages (deb, rpm, apk, etc)
|
||||
# - installer: Windows MSI installers
|
||||
# - diskimage: macOS DMG disk images
|
||||
# - archive: archives from archive pipe
|
||||
# - binary: binaries output from the build stage
|
||||
# - sbom: any SBOMs generated for other artifacts
|
||||
# - image: any Docker Images
|
||||
#
|
||||
# Default: no filter.
|
||||
artifacts: all
|
||||
|
||||
# The command to run.
|
||||
#
|
||||
# Templates: allowed.
|
||||
cmd: "./scan {{.ArtifactPath}}"
|
||||
|
||||
# Always prints command output.
|
||||
#
|
||||
# Default: false.
|
||||
output: true
|
||||
|
||||
# Base directory to run the commands from.
|
||||
#
|
||||
# Default: current working directory..
|
||||
dir: ./submodule # specify command working directory
|
||||
|
||||
# Additional environment variables to set.
|
||||
env:
|
||||
- "FILE_TO_TOUCH=something-{{ .ProjectName }}" # specify hook level environment variables
|
||||
```
|
||||
|
||||
!!! tip
|
||||
|
||||
Learn more about the [name template engine](/customization/templates/).
|
@ -34,8 +34,8 @@ brews:
|
||||
# IDs of the archives to use.
|
||||
# Empty means all IDs.
|
||||
ids:
|
||||
- foo
|
||||
- bar
|
||||
- foo
|
||||
- bar
|
||||
|
||||
# Sets the app file within a DMG.
|
||||
#
|
||||
|
@ -88,7 +88,7 @@ notarize:
|
||||
|
||||
## Signing only
|
||||
|
||||
> Since v2.1
|
||||
> Since v2.1.
|
||||
|
||||
If you want to only sign the binaries, but not notarize them, you can simply
|
||||
leave the `notarize` section of your configuration empty.
|
||||
|
@ -3,6 +3,7 @@
|
||||
GoReleaser Pro is a paid, closed-source GoReleaser distribution with some
|
||||
additional features:
|
||||
|
||||
- [x] Run [hooks before publishing](/customization/beforepublish) artifacts;
|
||||
- [x] Cross publish (e.g. releases to GitLab, pushes Homebrew Tap to GitHub);
|
||||
- [x] Keep [DockerHub image descriptions up to date](/customization/dockerhub);
|
||||
- [x] Create [macOS disk images (DMGs)](/customization/dmg);
|
||||
|
50
www/docs/static/schema-pro.json
generated
vendored
50
www/docs/static/schema-pro.json
generated
vendored
@ -269,6 +269,50 @@
|
||||
"additionalProperties": false,
|
||||
"type": "object"
|
||||
},
|
||||
"BeforePublishHook": {
|
||||
"properties": {
|
||||
"ids": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"dir": {
|
||||
"type": "string"
|
||||
},
|
||||
"cmd": {
|
||||
"type": "string"
|
||||
},
|
||||
"env": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"artifacts": {
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"image",
|
||||
"checksum",
|
||||
"source",
|
||||
"package",
|
||||
"archive",
|
||||
"binary",
|
||||
"sbom",
|
||||
"installer",
|
||||
"diskimage"
|
||||
]
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"output": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object"
|
||||
},
|
||||
"Blob": {
|
||||
"properties": {
|
||||
"bucket": {
|
||||
@ -2997,6 +3041,12 @@
|
||||
"$ref": "#/$defs/DockerHub"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"before_publish": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/BeforePublishHook"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
|
@ -126,6 +126,7 @@ nav:
|
||||
- Docker Images and Manifests: customization/docker_sign.md
|
||||
- customization/notarize.md
|
||||
- Publish:
|
||||
- customization/beforepublish.md
|
||||
- customization/release.md
|
||||
- customization/snapshots.md
|
||||
- customization/nightlies.md
|
||||
|
Loading…
x
Reference in New Issue
Block a user