Skip to content

Commit

Permalink
Extra automation for release process (building binaries and docker co…
Browse files Browse the repository at this point in the history
…ntainers) (#70)

Extra automation for release process (build binaries and docker containers via GHA)

Requires version numbers to now be full semver (x.y.z, not just x.y)
  • Loading branch information
michaelkaye committed Mar 22, 2023
1 parent 0584b10 commit e763e2a
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 11 deletions.
22 changes: 21 additions & 1 deletion .github/workflows/linting.yaml → .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
name: Linting and checks
name: Linting, build, test and release

# Runs on each PR to lint and test

# Runs on each release (via github UI) to lint and test, then upload binary to the release

on:
pull_request:
push:
branches: [master]
release:
types: [created]

permissions:
contents: write

jobs:
changelog:
Expand Down Expand Up @@ -46,3 +55,14 @@ jobs:
run: go build
- name: Test
run: go test
- name: Create tarball for release
if: github.event.release
run: tar -czf rageshake.tar.gz rageshake
- name: Upload tarball to matching release
if: github.event.release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
with:
files: rageshake.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

28 changes: 18 additions & 10 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
1. Set a variable to the version number for convenience:
```sh
ver=x.y
ver=x.y.z
```
1. Update the changelog:
```sh
Expand All @@ -15,16 +15,24 @@
1. Sanity-check the
[changelog](https://github.com/matrix-org/rageshake/blob/master/CHANGES.md)
and update if need be.
1. Create a signed tag for the release:
1. Create release on GH project page:
```sh
git tag -s v$ver
xdg-open https://github.com/matrix-org/rageshake/releases/new
```
Base the tag message on the changelog.
1. Push the tag:
```sh
git push origin tag v$ver
Set the tag to be the new version (eg v2.2.1).

Ensure you selected "create tag" if it doesn't already exist.
Release name will be autocompleted to the tag name
Describe the release based on the changelog
This will trigger a docker image to be built as well as a binary to be uploaded to the release
1. Check that the docker image has been created and tagged (a few mins)
```
1. Create release on GH project page:
```sh
xdg-open https://github.com/matrix-org/rageshake/releases/edit/v$ver
xdg-open https://github.com/matrix-org/rageshake/pkgs/container/rageshake/versions?filters%5Bversion_type%5D=tagged
```
1. Check that the rageshake binary has been built and added to the release (a few mins)
```
xdg-open https://github.com/matrix-org/rageshake/releases
```
1 change: 1 addition & 0 deletions changelog.d/70.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update deployment process to automatically build docker containers and binaries.

0 comments on commit e763e2a

Please sign in to comment.