mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-02-07 13:31:37 +02:00
docs: goreleaser-pro (#2260)
This commit is contained in:
parent
3843761902
commit
690b49b9fc
@ -42,10 +42,14 @@ jobs:
|
||||
name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v2
|
||||
with:
|
||||
# either 'goreleaser' (default) or 'goreleaser-pro'
|
||||
distribution: goreleaser
|
||||
version: latest
|
||||
args: release --rm-dist
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
|
||||
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
||||
```
|
||||
|
||||
!!! warning
|
||||
@ -118,11 +122,13 @@ signs:
|
||||
|
||||
Following inputs can be used as `step.with` keys
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|-----------|--------|----------|-------------------------------------------|
|
||||
| `version`¹| String | `latest` | GoReleaser version. Example: `v0.117.0` |
|
||||
| `args` | String | | Arguments to pass to GoReleaser |
|
||||
| `workdir` | String | `.` | Working directory (below repository root) |
|
||||
| Name | Type | Default | Description |
|
||||
|------------------|---------|--------------|------------------------------------------------------------------|
|
||||
| `distribution` | String | `goreleaser` | GoReleaser distribution, either `goreleaser` or `goreleaser-pro` |
|
||||
| `version`**¹** | 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
|
||||
@ -132,9 +138,10 @@ Following inputs can be used as `step.with` keys
|
||||
|
||||
Following environment variables can be used as `step.env` keys
|
||||
|
||||
| Name | Description |
|
||||
|----------------|-------------------------------------------------------|
|
||||
| `GITHUB_TOKEN` | [GITHUB_TOKEN][github-token] as provided by `secrets` |
|
||||
| Name | Description |
|
||||
|------------------|---------------------------------------|
|
||||
| `GITHUB_TOKEN` | [GITHUB_TOKEN](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token) as provided by `secrets` |
|
||||
| `GORELEASER_KEY` | Your [GoReleaser Pro](https://goreleaser.com/pro) License Key, in case you are using the `goreleaser-pro` distribution |
|
||||
|
||||
## Token Permissions
|
||||
|
||||
|
@ -11,6 +11,7 @@ goreleaser release [flags]
|
||||
```
|
||||
-f, --config string Load configuration from file
|
||||
-h, --help help for release
|
||||
-k, --key string GoReleaser Pro license key [$GORELEASER_KEY]
|
||||
-p, --parallelism int Amount tasks to run concurrently (default: number of CPUs)
|
||||
--release-footer string Load custom release notes footer from a markdown file
|
||||
--release-footer-tmpl string Load custom release notes footer from a templated markdown file (overrides --release-footer)
|
||||
|
@ -13,18 +13,40 @@ The configuration is very simple, here is a complete example:
|
||||
before:
|
||||
# Templates for the commands to be ran.
|
||||
hooks:
|
||||
- make clean
|
||||
- go generate ./...
|
||||
- go mod tidy
|
||||
- touch {{ .Env.FILE_TO_TOUCH }}
|
||||
- make clean # simple string
|
||||
- cmd: go generate ./... # specify cmd
|
||||
- cmd: go mod tidy
|
||||
dir: ./submodule # specify command working directory
|
||||
- cmd: touch {{ .Env.FILE_TO_TOUCH }}
|
||||
env:
|
||||
FILE_TO_TOUCH: 'something-{{ .ProjectName }}' # specify hook level environment variables
|
||||
```
|
||||
|
||||
If any of the hooks fails the build process is aborted.
|
||||
|
||||
It is important to note that you can't have "complex" commands, like
|
||||
`bash -c "echo foo bar"` or `foo | bar` or anything like that. If you need
|
||||
to do things that are more complex than just calling a command with some
|
||||
attributes, wrap it in a shell script or into your `Makefile`.
|
||||
In the same sense, you can also add global `after` hooks:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
after:
|
||||
# Templates for the commands to be ran.
|
||||
hooks:
|
||||
- make clean # simple string
|
||||
- cmd: go generate ./... # specify cmd
|
||||
- cmd: go mod tidy
|
||||
dir: ./submodule # specify command working directory
|
||||
- cmd: touch {{ .Env.FILE_TO_TOUCH }}
|
||||
env:
|
||||
FILE_TO_TOUCH: 'something-{{ .ProjectName }}' # specify hook level environment variables
|
||||
```
|
||||
|
||||
!!! info
|
||||
Global after hooks is a [GoReleaser Pro feature](/pro).
|
||||
|
||||
!!! tip
|
||||
Learn more about the [name template engine](/customization/templates/).
|
||||
|
||||
## Complex commands
|
||||
|
||||
If you need to do anything more complex, it is recommended to create a shell script and call it instead.
|
||||
You can also go crazy with `sh -c "my commands"`, but it gets ugly real fast.
|
||||
|
22
www/docs/customization/includes.md
Normal file
22
www/docs/customization/includes.md
Normal file
@ -0,0 +1,22 @@
|
||||
# Includes
|
||||
|
||||
GoReleaser allows you to include other files from an URL or in the current filesystem.
|
||||
|
||||
Files are included recursively in the order they are declared.
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
includes:
|
||||
- from_file:
|
||||
path: ./config/goreleaser.yml
|
||||
- from_url:
|
||||
url: https://raw.githubusercontent.com/goreleaser/goreleaser/master/.goreleaser.yml
|
||||
- from_url:
|
||||
url: https://api.mycompany.com/configs/goreleaser.yml
|
||||
headers:
|
||||
# header values are expanded in case they are environment variables
|
||||
x-api-token: "${MYCOMPANY_TOKEN}"
|
||||
```
|
||||
|
||||
!!! info
|
||||
Includes is a [GoReleaser Pro feature](/pro).
|
47
www/docs/customization/monorepo.md
Normal file
47
www/docs/customization/monorepo.md
Normal file
@ -0,0 +1,47 @@
|
||||
---
|
||||
title: Monorepo
|
||||
---
|
||||
|
||||
If you want to use GoReleaser within a monorepo and use tag prefixes to mark "which tags belong to which sub project", GoReleaser got you covered.
|
||||
|
||||
## Premise
|
||||
|
||||
You create your tags like `subproject1/v1.2.3` and `subproject2/v1.2.3`.
|
||||
|
||||
## Usage
|
||||
|
||||
You'll need to create a `.goreleaser.yml` for each subproject you want to use GoReleaser in:
|
||||
|
||||
```yaml
|
||||
# subroj1/.goreleaser.yml
|
||||
project_name: subproj1
|
||||
|
||||
monorepo:
|
||||
tag_prefix: subproject1/
|
||||
folder: subproj1
|
||||
```
|
||||
|
||||
Then, you can release with (from the project's root directory):
|
||||
|
||||
```sh
|
||||
goreleaser release --rm-dist -f ./subproj1/.goreleaser.yml
|
||||
```
|
||||
|
||||
Then, the following is different from a "regular" run:
|
||||
|
||||
- GoReleaser will then look if current commit has a tag prefixed with `subproject1`, and also the previous tag with the same prefix;
|
||||
- Changelog will include only commits that contain changes to files within the `subproj1` folder;
|
||||
- Release name gets prefixed with `{{ .ProjectName }} ` if empty;
|
||||
- All build's `dir` setting get set to `monorepo.folder` if empty;
|
||||
- if yours is not, you might want to change that manually;
|
||||
- Extra files on the release, archives, docker builds, etc are prefixed with `monorepo.folder`;
|
||||
- On templates, `{{.PrefixedTag}}` will be `monorepo.prefix/tag` (aka the actual tag name), and `{{.Tag}}` has the prefix stripped;
|
||||
|
||||
The rest of the release process should work as usual.
|
||||
|
||||
!!! info
|
||||
Monorepo support is a [GoReleaser Pro feature](/pro).
|
||||
|
||||
!!! warning
|
||||
This feature is in beta and might change based on feedback.
|
||||
Let me know you think about it after trying it out!
|
@ -39,7 +39,7 @@ release:
|
||||
prerelease: auto
|
||||
|
||||
# You can change the name of the release.
|
||||
# Default is `{{.Tag}}`
|
||||
# Default is `{{.Tag}}` on OSS and `{{.PrefixedTag}}` on Pro.
|
||||
name_template: "{{.ProjectName}}-v{{.Version}} {{.Env.USER}}"
|
||||
|
||||
# You can disable this pipe in order to not upload any artifacts.
|
||||
@ -74,7 +74,7 @@ release:
|
||||
- bar
|
||||
|
||||
# You can change the name of the release.
|
||||
# Default is `{{.Tag}}`
|
||||
# Default is `{{.Tag}}` on OSS and `{{.PrefixedTag}}` on Pro.
|
||||
name_template: "{{.ProjectName}}-v{{.Version}} {{.Env.USER}}"
|
||||
|
||||
# You can disable this pipe in order to not upload any artifacts.
|
||||
@ -115,7 +115,7 @@ release:
|
||||
- bar
|
||||
|
||||
# You can change the name of the release.
|
||||
# Default is `{{.Tag}}`
|
||||
# Default is `{{.Tag}}` on OSS and `{{.PrefixedTag}}` on Pro.
|
||||
name_template: "{{.ProjectName}}-v{{.Version}} {{.Env.USER}}"
|
||||
|
||||
# You can disable this pipe in order to not upload any artifacts.
|
||||
|
@ -15,6 +15,7 @@ On fields that support templating, these fields are always available:
|
||||
| `.ProjectName` | the project name |
|
||||
| `.Version` | the version being released (`v` prefix stripped),<br>or `{{ .Tag }}-SNAPSHOT-{{ .ShortCommit }}` in case of snapshot release |
|
||||
| `.Branch` | the current git branch |
|
||||
| `.PrefixedTag` | the current git tag prefixed with the monorepo config tag prefix (if any) |
|
||||
| `.Tag` | the current git tag |
|
||||
| `.ShortCommit` | the git commit short hash |
|
||||
| `.FullCommit` | the git commit full hash |
|
||||
|
@ -1,62 +1,98 @@
|
||||
# Install
|
||||
|
||||
You can install the pre-compiled binary (in several different ways),
|
||||
use Docker or compile from source.
|
||||
There are two GoReleaser distributions: OSS and [Pro](/pro).
|
||||
|
||||
You can install the pre-compiled binary (in several different ways), use Docker or compile from source (when on OSS).
|
||||
|
||||
Here are the steps for each of them:
|
||||
|
||||
## Install the pre-compiled binary
|
||||
|
||||
**homebrew tap**:
|
||||
### homebrew tap
|
||||
|
||||
#### oss
|
||||
|
||||
```sh
|
||||
brew install goreleaser/tap/goreleaser
|
||||
```
|
||||
|
||||
**homebrew** (may not be the latest version):
|
||||
#### pro
|
||||
|
||||
```sh
|
||||
brew install goreleaser/tap/goreleaser-pro
|
||||
```
|
||||
|
||||
### homebrew
|
||||
|
||||
OSS-only, may not be the latest version.
|
||||
|
||||
```sh
|
||||
brew install goreleaser
|
||||
```
|
||||
|
||||
**snapcraft**:
|
||||
### snapcraft
|
||||
|
||||
OSS only.
|
||||
|
||||
```sh
|
||||
sudo snap install --classic goreleaser
|
||||
```
|
||||
|
||||
**scoop**:
|
||||
### scoop
|
||||
|
||||
#### oss
|
||||
|
||||
```sh
|
||||
scoop bucket add goreleaser https://github.com/goreleaser/scoop-bucket.git
|
||||
scoop install goreleaser
|
||||
```
|
||||
|
||||
**deb/rpm/apk**:
|
||||
#### pro
|
||||
|
||||
Download the `.deb`, `.rpm` or `.apk` from the [releases page][releases] and install them with the appropriate tools.
|
||||
```sh
|
||||
scoop bucket add goreleaser https://github.com/goreleaser/scoop-bucket.git
|
||||
scoop install goreleaser-pro
|
||||
```
|
||||
|
||||
**shell script**:
|
||||
### deb, rpm and apk packages
|
||||
|
||||
Download the `.deb`, `.rpm` or `.apk` from the [OSS][releases] or [Pro][pro-releases] releases pages and install them with the appropriate tools.
|
||||
|
||||
### shell script
|
||||
|
||||
OSS only.
|
||||
|
||||
```sh
|
||||
curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sh
|
||||
```
|
||||
|
||||
**go install**:
|
||||
<!-- TODO: write a new shell script and store it within the website -->
|
||||
|
||||
### go install
|
||||
|
||||
OSS only.
|
||||
|
||||
```sh
|
||||
go install github.com/goreleaser/goreleaser
|
||||
```
|
||||
|
||||
**manually**:
|
||||
### manually
|
||||
|
||||
Download the pre-compiled binaries from the [releases page][releases] and
|
||||
copy to the desired location.
|
||||
Download the pre-compiled binaries from the [OSS][releases] or [Pro][pro-releases] releases pages and copy to the desired location.
|
||||
|
||||
## Running with Docker
|
||||
|
||||
You can also use it within a Docker container. To do that, you'll need to
|
||||
execute something more-or-less like the following:
|
||||
You can also use it within a Docker container.
|
||||
To do that, you'll need to execute something more-or-less like the examples bellow.
|
||||
|
||||
### oss
|
||||
|
||||
Registries:
|
||||
|
||||
- [`goreleaser/goreleaser`](https://hub.docker.com/r/goreleaser/goreleaser)
|
||||
- [`ghcr.io/goreleaser/goreleaser`](https://github.com/orgs/goreleaser/packages/container/package/goreleaser)
|
||||
|
||||
Example usage:
|
||||
|
||||
```sh
|
||||
docker run --rm --privileged \
|
||||
@ -70,6 +106,28 @@ docker run --rm --privileged \
|
||||
goreleaser/goreleaser release
|
||||
```
|
||||
|
||||
### pro
|
||||
|
||||
Registries:
|
||||
|
||||
- [`goreleaser/goreleaser-pro`](https://hub.docker.com/r/goreleaser/goreleaser-pro)
|
||||
- [`ghcr.io/goreleaser/goreleaser-pro`](https://github.com/orgs/goreleaser/packages/container/package/goreleaser-pro)
|
||||
|
||||
Example usage:
|
||||
|
||||
```sh
|
||||
docker run --rm --privileged \
|
||||
-v $PWD:/go/src/github.com/user/repo \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-w /go/src/github.com/user/repo \
|
||||
-e GITHUB_TOKEN \
|
||||
-e DOCKER_USERNAME \
|
||||
-e DOCKER_PASSWORD \
|
||||
-e DOCKER_REGISTRY \
|
||||
-e GORELEASER_KEY \
|
||||
goreleaser/goreleaser-pro release
|
||||
```
|
||||
|
||||
!!! info
|
||||
Currently, the provided docker image does not support
|
||||
the generation of snapcraft packages.
|
||||
@ -85,6 +143,7 @@ and iterate from that.
|
||||
|
||||
[dockerfile]: https://github.com/goreleaser/goreleaser/blob/master/Dockerfile
|
||||
[releases]: https://github.com/goreleaser/goreleaser/releases
|
||||
[pro-releases]: https://github.com/goreleaser/goreleaser-pro/releases
|
||||
|
||||
## Compiling from source
|
||||
|
||||
|
@ -133,6 +133,7 @@
|
||||
<li>Release to GitHub, GitLab and Gitea</li>
|
||||
<li>Create Docker images and manifests</li>
|
||||
<li>Create Linux packages and Homebrew taps</li>
|
||||
<li>Announce new releases on Twitter</li>
|
||||
<li>... and much more!</li>
|
||||
</ul>
|
||||
<a href="{{ page.next_page.url | url }}" title="{{ page.next_page.title | striptags }}"
|
||||
|
36
www/docs/pro.md
Normal file
36
www/docs/pro.md
Normal file
@ -0,0 +1,36 @@
|
||||
# GoReleaser Pro
|
||||
|
||||
GoReleaser Pro is now available with some unique features such as:
|
||||
|
||||
- Hability to [include](/customization/includes/) config files (useful for common configurations);
|
||||
- Improved global hooks and [global after hooks](/customization/hooks/);
|
||||
- Monorepo support!
|
||||
|
||||
<script src="https://gumroad.com/js/gumroad.js"></script>
|
||||
<a class="gumroad-button" href="https://gumroad.com/l/CadfZ" target="_blank">Get GoReleaser Pro</a>
|
||||
|
||||
_or go to [https://gum.co/goreleaser](https://gum.co/goreleaser)_
|
||||
|
||||
## Roadmap
|
||||
|
||||
The roadmap is as not public, but we do have a couple of ideas and your input is always welcome!
|
||||
Once you buy it, feel free to reply the email with your suggestions.
|
||||
|
||||
## Pricing & Sponsors
|
||||
|
||||
- The current pricing is "low" and is likely to increase as we keep adding more pro-only features;
|
||||
- If you sponsor either the project or its developers, you [can ask for a discount](mailto:carlos@becker.software?subject=GoReleaser%20Coupon%20Request)!
|
||||
|
||||
## Enteprise support
|
||||
|
||||
I don't have a plan for that yet, but please [email me](mailto:carlos@becker.software?subject=GoReleaser%20Enterprise%20Support) if you are interested.
|
||||
|
||||
## Using GoReleaser Pro
|
||||
|
||||
When you buy it on [gumroad](https://gum.co/goreleaser), you'll get a license key.
|
||||
|
||||
You can then pass it to the `release` command either via the `--key` flag or the `GORELEASER_KEY` environment variable.
|
||||
|
||||
---
|
||||
|
||||
**✨✨ Thanks for your support! ✨✨**
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: Sponsoring the Project
|
||||
title: Sponsors
|
||||
---
|
||||
|
||||
Does you or your company use GoReleaser?
|
||||
@ -9,12 +9,12 @@ You can help keep the project bug-free and feature rich by sponsoring the projec
|
||||
|
||||
GitHub Sponsors is a great way to contribute directly to the main maintainer, [caarlos0](https://github.com/caarlos0).
|
||||
|
||||
This money usually goes to buying coffee, beer, better hardware and such.
|
||||
This money usually goes to buying coffee, beer, better hardware, and, hopefully, one day, paying the bills.
|
||||
|
||||
<iframe src="https://github.com/sponsors/caarlos0/button" title="Sponsor caarlos0" height="35" width="116" style="border: 0;"></iframe>
|
||||
|
||||
You can sponsor and see who's sponsoring Carlos [here](https://github.com/sponsors/caarlos0).
|
||||
|
||||
<iframe src="https://github.com/sponsors/caarlos0/card" title="Sponsor caarlos0" height="225" width="600" style="border: 0;"></iframe>
|
||||
|
||||
## OpenCollective
|
||||
|
||||
OpenCollective is a great way to send some money towards the GoReleaser organization.
|
||||
@ -65,3 +65,7 @@ Bellow you can see a list of the current sponsors and backers on OpenCollective:
|
||||
<a href="https://opencollective.com/goreleaser/backers/27/website" target="_blank"><img src="https://opencollective.com/goreleaser/backers/27/avatar"></a>
|
||||
<a href="https://opencollective.com/goreleaser/backers/28/website" target="_blank"><img src="https://opencollective.com/goreleaser/backers/28/avatar"></a>
|
||||
<a href="https://opencollective.com/goreleaser/backers/29/website" target="_blank"><img src="https://opencollective.com/goreleaser/backers/29/avatar"></a>
|
||||
|
||||
---
|
||||
|
||||
**✨✨ Thanks for your support! ✨✨**
|
||||
|
@ -83,7 +83,9 @@ nav:
|
||||
- customization/gomod.md
|
||||
- customization/homebrew.md
|
||||
- customization/hooks.md
|
||||
- customization/includes.md
|
||||
- customization/milestone.md
|
||||
- customization/monorepo.md
|
||||
- customization/nfpm.md
|
||||
- customization/project.md
|
||||
- customization/publishers.md
|
||||
@ -106,6 +108,7 @@ nav:
|
||||
- Cookbooks:
|
||||
- About: cookbooks/index.md
|
||||
- Blog Posts: cookbooks/blog-posts.md
|
||||
- Add a new cookbook: cookbooks/contributing.md
|
||||
- cookbooks//build-go-modules.md
|
||||
- cookbooks/cgo-and-crosscompiling.md
|
||||
- cookbooks/debconf-templates.md
|
||||
@ -113,6 +116,7 @@ nav:
|
||||
- cookbooks/release-a-library.md
|
||||
- cookbooks/semantic-release.md
|
||||
- cookbooks/upload-to-bintray.md
|
||||
- pro.md
|
||||
- sponsors.md
|
||||
- contributing.md
|
||||
- links.md
|
||||
|
Loading…
x
Reference in New Issue
Block a user