Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automate more parts of the publishing process #268

Merged
merged 4 commits into from Jan 9, 2023
Merged

Conversation

gabrielittner
Copy link
Member

With this it is not neccessary to push commits to main anymore to do a release and as much as possible is automated. The remaining steps are:

  1. update changelog (through a pr), we could probably also have some automation here but I personally don't like these auto generated changelogs
  2. create and push a tag for the new version

To make this possible there are a few changes:

  • slightly updated the CHANGELOG.md format
  • the release workflow will extract the section for the new release and automatically create a Github release with it
  • VERSION_NAME is not comitted anymore and instead always computed
  • for releases we tag the tag name as version
  • for snapshots we take the last tag increment the last number by 1 and then append SNAPSHOT
  • the readme contains <latest-version> pacehoders and one of those badges that shows the last version
  • for the website we automatically replace <latest-version> with the last tag and remove the badge
  • snapshot and website workflows run after the release so that there is a snapshot for the next release and the website contains the latest version

The only part that I don't like that much is the <latest-version> placeholder in the README, I prefer when it just has the full declaration ready to copy, but at least it's like this on the website.

Already tested this here

@gabrielittner gabrielittner marked this pull request as ready for review January 9, 2023 07:22
Copy link
Contributor

@kboyarshinov kboyarshinov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍 :shipit:

- name: Get release notes
run: |
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
echo "$(awk '/^## ${{ github.ref_name }}/{flag=1;next}/^## /{flag=0}flag' CHANGELOG.md)" >> $GITHUB_ENV
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awk 🤯

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it from stack overflow 😆

CHANGELOG.md Outdated Show resolved Hide resolved
gabrielittner and others added 2 commits January 9, 2023 19:04
Co-authored-by: Kirill Boyarshinov <1917615+kboyarshinov@users.noreply.github.com>
@gabrielittner gabrielittner enabled auto-merge (squash) January 9, 2023 18:04
@gabrielittner gabrielittner merged commit c6186b2 into main Jan 9, 2023
@gabrielittner gabrielittner deleted the release-process branch January 9, 2023 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants