Skip to content

Commit

Permalink
Document automated release process
Browse files Browse the repository at this point in the history
Authored-by: Owen Nelson <[email protected]>
  • Loading branch information
tw-owen-nelson committed Jan 26, 2024
1 parent d61d50d commit b6991bb
Showing 1 changed file with 26 additions and 22 deletions.
48 changes: 26 additions & 22 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,33 @@ If you are not sure how to begin contributing to Talisman, have a look at the is

## Developing locally

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

Talisman now uses go modules (GO111MODULE=on) to manage dependencies

Once you have go 1.11 installed and setup, clone the talisman repository. In your
working copy, fetch the dependencies by having go mod fetch them for
you.
Once you have go installed and set up, clone the talisman repository. In your
working copy, fetch the dependencies by having go mod fetch them for you:

```
GO111MODULE=on go mod vendor
go mod vendor
```

To run tests `GO111MODULE=on go test -mod=vendor ./...`
Run the tests:

```
go test ./...
```

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

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

Convenience scripts `./build` and `./clean` perform build and clean-up as mentioned above.
To build for multiple platforms we use [GoReleaser](https://goreleaser.com/):

```
goreleaser build --snapshot --clean
```

## Submitting a Pull Request

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

## Updating Talisman Gihub Pages
## Updating Talisman GitHub Pages

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

## Releasing

* 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
* 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 ...`)
* Make release commit and tag with the new version prefixed by `v` (like `git tag v0.3.0`)
* Push your release commit and tag: `git push && git push --tags`
* [Create a new release in github](https://github.com/thoughtworks/talisman/releases/new), filling in the new commit tag you just created
* Update the install script hosted on github pages: `git checkout gh-pages`, `git checkout master -- install.sh`, `git commit -m ...`
1. Tag the commit to be released with the next version according to
[semver](https://semver.org/) conventions
2. Push the tag to trigger the GitHub Actions Release pipeline
3. Approve the [drafted GitHub Release](https://github.com/thoughtworks/talisman/releases)

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.
The latest version will now be accessible to anyone who builds their own
binaries, downloads binaries directly from GitHub Releases or homebrew, or uses
the install script from the website.

0 comments on commit b6991bb

Please sign in to comment.