Skip to content

Commit

Permalink
github/workflows: auto generate changelog (#677)
Browse files Browse the repository at this point in the history
Auto-generates changelog in github action. Also simplify by removing usage of docker image and just use local code.

category: misc
ticket: #320
  • Loading branch information
corverroos authored Jun 7, 2022
1 parent 6c11659 commit 6deb116
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 30 deletions.
26 changes: 3 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,11 @@ jobs:
runs-on: ubuntu-latest
name: Publish Release
steps:

# Wait for docker build to complete since we need pegged cli-reference.
- uses: fountainhead/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
checkName: Build Docker Image

- uses: actions/checkout@v2

- id: get-tag
run: |
tag=$(echo "${{ github.ref }}" | cut -d / -f 3)
echo "::set-output name=tag::$tag"
- run: docker run ghcr.io/obolnetwork/charon:${{steps.get-tag.outputs.tag}} run --help > cli-reference.txt

- run: cat cli-reference.txt

- run: go run . --help > cli-reference.txt
- run: go run testutil/genchangelog/main.go
- uses: softprops/action-gh-release@v1
with:
files: cli-reference.txt
body: |
![Obol Logo](https://obol.tech/obolnetwork.png)
Charon client version `${{steps.get-tag.outputs.tag}}`.
###### This software is in beta, use with caution
body_path: changelog.md
token: ${{ secrets.RELEASE_SECRET }}
13 changes: 6 additions & 7 deletions docs/branching.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ We follow [Trunk Based Development](https://trunkbaseddevelopment.com/) as a bra

Charon is set up to create a release with Github Actions triggered by a tag. To create a new release:

1. Ensure all tests are passing
1. Do a quick smoke test by running charon-docker-compose
1. Identify the version of the release, e.g. `v0.1.2` (note the `v`).
1. Push a PR that bumps charon version global variable, see example https://github.com/ObolNetwork/charon/pull/312
1. Merge above PR, checkout latest main, and tag it: `git tag <version> && git push --tags`
1. Generate changelog: `go run testutil/genchangelog/main.go`.
1. Edit the auto-generated release on github: `https://github.com/ObolNetwork/charon/releases/tag/<version>`
1. Ensure the build is green and that all tests are passing
2. Identify the version of the release, e.g. `v0.1.2` (note the `v`).
3. Push a PR that bumps charon version global variable, see example https://github.com/ObolNetwork/charon/pull/312
4. Merge above PR, checkout latest main, and tag it: `git tag <version> && git push --tags`
5. Double-check the generated release and changelog: `https://github.com/ObolNetwork/charon/releases/tag/<version>`
6. Maybe generate a changelog manually and/or update the release: `go run testutil/genchangelog/main.go`

0 comments on commit 6deb116

Please sign in to comment.