mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-17 20:47:50 +02:00
docs: several improvements
This commit is contained in:
parent
6454dd7db4
commit
4b68c6af92
@ -21,6 +21,21 @@ env_files:
|
||||
github_token: ~/.path/to/my/token
|
||||
```
|
||||
|
||||
## GitHub Enterprise
|
||||
|
||||
You can use GoReleaser with GitHub Enterprise by providing its URLs in
|
||||
the `.goreleaser.yml` configuration file:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
github_urls:
|
||||
api: api.github.foo.bar
|
||||
upload: uploads.github.foo.bar
|
||||
download: github.foo.bar
|
||||
```
|
||||
|
||||
If none are set, they default to GitHub's public URLs.
|
||||
|
||||
## The dist folder
|
||||
|
||||
By default, GoReleaser will create its artifacts in the `./dist` folder.
|
||||
|
@ -1,15 +1,125 @@
|
||||
---
|
||||
title: Snapcraft
|
||||
title: Linux Packages
|
||||
---
|
||||
|
||||
GoReleaser can generate `snap` packages. [Snaps](http://snapcraft.io/) are a
|
||||
new packaging format, that will let you publish your project directly to the
|
||||
Ubuntu store. From there it will be installable in all the
|
||||
GoReleaser can generate RPM, Deb and Snap packages for your projects.
|
||||
|
||||
Let's see each option in detail:
|
||||
|
||||
## NFPM
|
||||
|
||||
GoReleaser can be wired to [nfpm](https://github.com/goreleaser/nfpm) to
|
||||
generate and publish `.deb` and `.rpm` packages.
|
||||
|
||||
Available options:
|
||||
|
||||
```yml
|
||||
# .goreleaser.yml
|
||||
nfpm:
|
||||
# You can change the name of the package.
|
||||
# This is parsed with the Go template engine and the following variables
|
||||
# are available:
|
||||
# - ProjectName
|
||||
# - Tag
|
||||
# - Version (Git tag without `v` prefix)
|
||||
# - Os
|
||||
# - Arch
|
||||
# - Arm (ARM version)
|
||||
# - Env (environment variables)
|
||||
# Default: `{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}`
|
||||
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
|
||||
|
||||
# Replacements for GOOS and GOARCH in the package name.
|
||||
# Keys should be valid GOOSs or GOARCHs.
|
||||
# Values are the respective replacements.
|
||||
# Default is empty.
|
||||
replacements:
|
||||
amd64: 64-bit
|
||||
386: 32-bit
|
||||
darwin: macOS
|
||||
linux: Tux
|
||||
|
||||
# Your app's vendor.
|
||||
# Default is empty.
|
||||
vendor: Drum Roll Inc.
|
||||
# Your app's homepage.
|
||||
# Default is empty.
|
||||
homepage: https://example.com/
|
||||
|
||||
# Your app's maintainer (probably you).
|
||||
# Default is empty.
|
||||
maintainer: Drummer <drum-roll@example.com>
|
||||
|
||||
# Your app's description.
|
||||
# Default is empty.
|
||||
description: Software to create fast and easy drum rolls.
|
||||
|
||||
# Your app's license.
|
||||
# Default is empty.
|
||||
license: Apache 2.0
|
||||
|
||||
# Formats to be generated.
|
||||
formats:
|
||||
- deb
|
||||
- rpm
|
||||
|
||||
# Packages your package depends on.
|
||||
dependencies:
|
||||
- git
|
||||
- zsh
|
||||
|
||||
# Packages your package recommends installing.
|
||||
# For RPM packages rpmbuild >= 4.13 is required
|
||||
recommends:
|
||||
- bzr
|
||||
- gtk
|
||||
|
||||
# Packages your package suggests installing.
|
||||
# For RPM packages rpmbuild >= 4.13 is required
|
||||
suggests:
|
||||
- cvs
|
||||
- ksh
|
||||
|
||||
# Packages that conflict with your package.
|
||||
conflicts:
|
||||
- svn
|
||||
- bash
|
||||
|
||||
# Override default /usr/local/bin destination for binaries
|
||||
bindir: /usr/bin
|
||||
|
||||
# Files or directories to add to your package (beyond the binary).
|
||||
# Keys are source paths to get the files from.
|
||||
# Values are the destination locations of the files in the package.
|
||||
files:
|
||||
"scripts/etc/init.d/": "/etc/init.d"
|
||||
|
||||
# Config files to add to your package. They are about the same as
|
||||
# the files keyword, except package managers treat them differently (while
|
||||
# uninstalling, mostly).
|
||||
# Keys are source paths to get the files from.
|
||||
# Values are the destination locations of the files in the package.
|
||||
config_files:
|
||||
"conf/app.conf": "/etc/app.conf"
|
||||
```
|
||||
|
||||
Note that GoReleaser will not install `rpmbuild` or any dependencies for you.
|
||||
As for now, `rpmbuild` is recommended if you want to generate rpm packages.
|
||||
You can install it with `apt-get install rpm` or `brew install rpm`.
|
||||
|
||||
## Snapcraft
|
||||
|
||||
GoReleaser can also generate `snap` packages.
|
||||
[Snaps](http://snapcraft.io/) are a new packaging format, that will let you
|
||||
publish your project directly to the Ubuntu store.
|
||||
From there it will be installable in all the
|
||||
[supported Linux distros](https://snapcraft.io/docs/core/install), with
|
||||
automatic and transactional updates.
|
||||
|
||||
You can read more about it in the [snapcraft docs](https://snapcraft.io/docs/).
|
||||
|
||||
Available options:
|
||||
|
||||
```yml
|
||||
# .goreleaser.yml
|
||||
snapcraft:
|
100
docs/100-nfpm.md
100
docs/100-nfpm.md
@ -1,100 +0,0 @@
|
||||
---
|
||||
title: NFPM
|
||||
---
|
||||
|
||||
GoReleaser can be wired to [nfpm](https://github.com/goreleaser/nfpm) to
|
||||
generate and publish `.deb` and `.rpm` packages.
|
||||
|
||||
```yml
|
||||
# .goreleaser.yml
|
||||
nfpm:
|
||||
# You can change the name of the package.
|
||||
# This is parsed with the Go template engine and the following variables
|
||||
# are available:
|
||||
# - ProjectName
|
||||
# - Tag
|
||||
# - Version (Git tag without `v` prefix)
|
||||
# - Os
|
||||
# - Arch
|
||||
# - Arm (ARM version)
|
||||
# - Env (environment variables)
|
||||
# Default: `{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}`
|
||||
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
|
||||
|
||||
# Replacements for GOOS and GOARCH in the package name.
|
||||
# Keys should be valid GOOSs or GOARCHs.
|
||||
# Values are the respective replacements.
|
||||
# Default is empty.
|
||||
replacements:
|
||||
amd64: 64-bit
|
||||
386: 32-bit
|
||||
darwin: macOS
|
||||
linux: Tux
|
||||
|
||||
# Your app's vendor.
|
||||
# Default is empty.
|
||||
vendor: Drum Roll Inc.
|
||||
# Your app's homepage.
|
||||
# Default is empty.
|
||||
homepage: https://example.com/
|
||||
|
||||
# Your app's maintainer (probably you).
|
||||
# Default is empty.
|
||||
maintainer: Drummer <drum-roll@example.com>
|
||||
|
||||
# Your app's description.
|
||||
# Default is empty.
|
||||
description: Software to create fast and easy drum rolls.
|
||||
|
||||
# Your app's license.
|
||||
# Default is empty.
|
||||
license: Apache 2.0
|
||||
|
||||
# Formats to be generated.
|
||||
formats:
|
||||
- deb
|
||||
- rpm
|
||||
|
||||
# Packages your package depends on.
|
||||
dependencies:
|
||||
- git
|
||||
- zsh
|
||||
|
||||
# Packages your package recommends installing.
|
||||
# For RPM packages rpmbuild >= 4.13 is required
|
||||
recommends:
|
||||
- bzr
|
||||
- gtk
|
||||
|
||||
# Packages your package suggests installing.
|
||||
# For RPM packages rpmbuild >= 4.13 is required
|
||||
suggests:
|
||||
- cvs
|
||||
- ksh
|
||||
|
||||
# Packages that conflict with your package.
|
||||
conflicts:
|
||||
- svn
|
||||
- bash
|
||||
|
||||
# Override default /usr/local/bin destination for binaries
|
||||
bindir: /usr/bin
|
||||
|
||||
# Files or directories to add to your package (beyond the binary).
|
||||
# Keys are source paths to get the files from.
|
||||
# Values are the destination locations of the files in the package.
|
||||
files:
|
||||
"scripts/etc/init.d/": "/etc/init.d"
|
||||
|
||||
# Config files to add to your package. They are about the same as
|
||||
# the files keyword, except package managers treat them differently (while
|
||||
# uninstalling, mostly).
|
||||
# Keys are source paths to get the files from.
|
||||
# Values are the destination locations of the files in the package.
|
||||
config_files:
|
||||
"conf/app.conf": "/etc/app.conf"
|
||||
```
|
||||
|
||||
Note that GoReleaser will not install `rpmbuild` or any dependencies for you.
|
||||
As for now, `rpmbuild` is recommended if you want to generate rpm packages.
|
||||
You can install it with `apt-get install rpm` or `brew install rpm`.
|
@ -1,9 +1,10 @@
|
||||
---
|
||||
title: Releasing
|
||||
title: Release
|
||||
---
|
||||
|
||||
GoReleaser will create a release in GitHub with the current tag, upload all
|
||||
the archives and checksums, also generate a changelog from the commits new since the last tag.
|
||||
GoReleaser will create a GitHub release with the current tag, upload all
|
||||
the artifacts and generate the changelog based on the new commits since the
|
||||
previous tag.
|
||||
|
||||
Let's see what can be customized in the `release` section:
|
||||
|
||||
@ -68,6 +69,6 @@ On Unix systems you can also generate the release notes in-line by using
|
||||
To list all commits since the last tag, but skip ones starting with `Merge` or
|
||||
`docs`, you could run this command:
|
||||
|
||||
```sh
|
||||
goreleaser --release-notes <(git log --pretty=oneline --abbrev-commit $(git describe --tags --abbrev=0)^.. | grep -v '^[^ ]* \(Merge\|docs\)')
|
||||
```console
|
||||
$ goreleaser --release-notes <(some_changelog_generator)
|
||||
```
|
@ -33,17 +33,14 @@ The `target` is the URL to upload the artifacts to (_without_ the name of the ar
|
||||
|
||||
An example configuration for `goreleaser` in upload mode `binary` with the target can look like
|
||||
|
||||
```
|
||||
http://artifacts.company.com:8081/artifactory/example-repo-local/{{ .ProjectName }}/{{ .Version }}/{{ .Os }}/{{ .Arch }}{{ if .Arm }}{{ .Arm }}{{ end }}
|
||||
```yaml
|
||||
- mode: binary
|
||||
target: 'http://artifacts.company.com:8081/artifactory/example-repo-local/{{ .ProjectName }}/{{ .Version }}/{{ .Os }}/{{ .Arch }}{{ if .Arm }}{{ .Arm }}{{ end }}'
|
||||
```
|
||||
|
||||
and will result in a final deployment like
|
||||
and will result in a final deployment like `http://artifacts.company.com:8081/artifactory/example-repo-local/goreleaser/1.0.0/Darwin/x86_64/goreleaser`.
|
||||
|
||||
```
|
||||
http://artifacts.company.com:8081/artifactory/example-repo-local/goreleaser/1.0.0/Darwin/x86_64/goreleaser
|
||||
```
|
||||
|
||||
Support variables:
|
||||
Supported variables:
|
||||
|
||||
* Version
|
||||
* Tag
|
||||
@ -52,7 +49,8 @@ Support variables:
|
||||
* Arch
|
||||
* Arm
|
||||
|
||||
_Attention_: Variables _Os_, _Arch_ and _Arm_ are only supported in upload mode `binary`.
|
||||
_Attention_: Variables _Os_, _Arch_ and _Arm_ are only supported in upload
|
||||
mode `binary`.
|
||||
|
||||
### Password / API Key
|
||||
|
||||
|
@ -111,9 +111,5 @@ This will build and publish the following images:
|
||||
* myuser/myimage:v1.6
|
||||
* myuser/myimage:latest
|
||||
|
||||
Hope this feature serves you well!
|
||||
|
||||
More info:
|
||||
|
||||
* [#461](https://github.com/goreleaser/goreleaser/issues/461)
|
||||
* [#505](https://github.com/goreleaser/goreleaser/issues/505)
|
||||
With these settings you can hopefully push several different docker images
|
||||
with multiple tags.
|
||||
|
@ -16,11 +16,21 @@ You may want to setup your project to auto-deploy your new tags on
|
||||
# .travis.yml
|
||||
language: go
|
||||
|
||||
# needed for the nfpm pipe
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
# needed for the nfpm pipe:
|
||||
- rpm
|
||||
# needed for the snap pipe:
|
||||
- snapcraft
|
||||
|
||||
env:
|
||||
# needed for the snap pipe:
|
||||
- PATH=/snap/bin:$PATH
|
||||
|
||||
install:
|
||||
# needed for the snap pipe:
|
||||
- sudo snap install snapcraft --classic
|
||||
|
||||
# needed for the docker pipe
|
||||
services:
|
||||
|
@ -1,16 +0,0 @@
|
||||
---
|
||||
title: GitHub Enterprise
|
||||
---
|
||||
|
||||
You can use GoReleaser with GitHub Enterprise by providing its URLs in
|
||||
the `.goreleaser.yml` configuration file:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
github_urls:
|
||||
api: api.github.foo.bar
|
||||
upload: uploads.github.foo.bar
|
||||
download: github.foo.bar
|
||||
```
|
||||
|
||||
If none are set, they default to GitHub's public URLs.
|
@ -4,7 +4,7 @@ title: Links
|
||||
|
||||
* Follow the progress on the [GitHub repository](https://github.com/goreleaser/goreleaser)
|
||||
* Follow [@goreleaser](https://twitter.com/goreleaser) on Twitter for updates
|
||||
* [Slack](https://gophers.slack.com/messages/goreleaser/) to chat about GoReleaser,
|
||||
* Chat on [Slack](https://gophers.slack.com/messages/goreleaser/) to chat about GoReleaser,
|
||||
questions, etc. Join using [this link](https://invite.slack.golangbridge.org/)
|
||||
* [Contributing Guidelines](https://github.com/goreleaser/goreleaser/blob/master/CONTRIBUTING.md)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user