Skip to content

Commit b6991bb

Browse files
Document automated release process
Authored-by: Owen Nelson <[email protected]>
1 parent d61d50d commit b6991bb

File tree

1 file changed

+26
-22
lines changed

1 file changed

+26
-22
lines changed

contributing.md

+26-22
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,33 @@ If you are not sure how to begin contributing to Talisman, have a look at the is
88

99
## Developing locally
1010

11-
To contribute to Talisman, you need a working golang development
12-
environment. Check [this link](https://golang.org/doc/install) to help
13-
you get started with that.
11+
To contribute to Talisman, you need a working golang development environment.
12+
Check [this link](https://golang.org/doc/install) to help you get started.
1413

15-
Talisman now uses go modules (GO111MODULE=on) to manage dependencies
16-
17-
Once you have go 1.11 installed and setup, clone the talisman repository. In your
18-
working copy, fetch the dependencies by having go mod fetch them for
19-
you.
14+
Once you have go installed and set up, clone the talisman repository. In your
15+
working copy, fetch the dependencies by having go mod fetch them for you:
2016

2117
```
22-
GO111MODULE=on go mod vendor
18+
go mod vendor
2319
```
2420

25-
To run tests `GO111MODULE=on go test -mod=vendor ./...`
21+
Run the tests:
22+
23+
```
24+
go test ./...
25+
```
2626

27-
To build Talisman, we can use [gox](https://github.com/mitchellh/gox):
27+
Build talisman:
2828

2929
```
30-
gox -osarch="darwin/amd64 linux/386 linux/amd64"
30+
go build -o dist/talisman -ldflags="-s -w" talisman/cmd
3131
```
3232

33-
Convenience scripts `./build` and `./clean` perform build and clean-up as mentioned above.
33+
To build for multiple platforms we use [GoReleaser](https://goreleaser.com/):
34+
35+
```
36+
goreleaser build --snapshot --clean
37+
```
3438

3539
## Submitting a Pull Request
3640

@@ -42,20 +46,20 @@ To send in a pull request
4246
4. Ensure that all the tests pass.
4347
5. Submit the pull request.
4448

45-
## Updating Talisman Gihub Pages
49+
## Updating Talisman GitHub Pages
4650

4751
1. Checkout a new branch from gh-pages
4852
2. Navigate to the docs/ folder and update the files
49-
3. See instructions for checking locally [here](https://github.com/thoughtworks/talisman/blob/gh-pages/README.md).
53+
3. See instructions for checking locally [here](https://github.com/thoughtworks/talisman/blob/gh-pages/README.md).
5054
4. Raise a pull request against the branch gh-pages
5155

5256
## Releasing
5357

54-
* Follow the instructions at the end of 'Developing locally' to build the binaries* Bump the [version in install.sh](https://github.com/thoughtworks/talisman/blob/d4b1b1d11137dbb173bf681a03f16183a9d82255/install.sh#L10) according to [semver](https://semver.org/) conventions
55-
* Update the [expected hashes in install.sh](https://github.com/thoughtworks/talisman/blob/d4b1b1d11137dbb173bf681a03f16183a9d82255/install.sh#L16-L18) to match the new binaries you just created (`shasum -b -a256 ...`)
56-
* Make release commit and tag with the new version prefixed by `v` (like `git tag v0.3.0`)
57-
* Push your release commit and tag: `git push && git push --tags`
58-
* [Create a new release in github](https://github.com/thoughtworks/talisman/releases/new), filling in the new commit tag you just created
59-
* Update the install script hosted on github pages: `git checkout gh-pages`, `git checkout master -- install.sh`, `git commit -m ...`
58+
1. Tag the commit to be released with the next version according to
59+
[semver](https://semver.org/) conventions
60+
2. Push the tag to trigger the GitHub Actions Release pipeline
61+
3. Approve the [drafted GitHub Release](https://github.com/thoughtworks/talisman/releases)
6062

61-
The latest version will now be accessible to anyone who builds their own binaries, downloads binaries directly from github releases, or uses the install script from the website.
63+
The latest version will now be accessible to anyone who builds their own
64+
binaries, downloads binaries directly from GitHub Releases or homebrew, or uses
65+
the install script from the website.

0 commit comments

Comments
 (0)