forked from gliderlabs/registrator
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: document how to create a release
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Release | ||
|
||
## How to Create a Release | ||
|
||
1. Create a git tag for the new release | ||
|
||
```sh | ||
git tag v<MY-VERSION> | ||
``` | ||
|
||
**ADVISE**: Do not push the tag. Instead let it be created by GitHub when | ||
removing the draft status. This allows to eventually recreate + delete the | ||
draft release without having the tags already on the on the git remote. | ||
|
||
2. Import our GPG signing private key: | ||
- retrieve the GPG private key password and store it in an environment | ||
variable: | ||
|
||
```sh | ||
export GPG_PASSWORD="$(vault read -field=master-priv-key-password secret/gpg-key-platform)" | ||
``` | ||
|
||
- import the signing key: | ||
|
||
```sh | ||
vault read -field=subkey-signing-priv-key secret/gpg-key-platform | \ | ||
gpg --batch --pinentry-mode loopback --passphrase "$GPG_PASSWORD" --import | ||
``` | ||
|
||
3. Set the `GITHUB_TOKEN` environment variable: | ||
|
||
```sh | ||
export GITHUB_TOKEN=<MY-TOKEN> | ||
``` | ||
|
||
4. Run goreleaser | ||
|
||
```sh | ||
goreleaser release | ||
``` | ||
|
||
5. Review the created draft release on | ||
[GitHub](https://github.com/simplesurance/registrator/releases) and publish | ||
it. |