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

Include workflow for automatic CHANGELOG and version bumps #913

Merged
merged 10 commits into from
Apr 4, 2024

Conversation

howard-e
Copy link
Contributor

@howard-e howard-e commented Feb 6, 2024

Added workflows/version-changelog-update.yml to automatically bump the app's version and update a CHANGELOG.md, when the releases branch is updated.

The workflow makes use of TriPSs/conventional-changelog-action which automates the version bumping, tagging and CHANGELOG.md generation needs.

This also updates relevant docs related to this new release practice.

Note: This assumes a development exists (and is the default branch) and a releases branch exists.

@howard-e howard-e marked this pull request as ready for review February 6, 2024 18:59
Copy link
Contributor

@jugglinmike jugglinmike left a comment

Choose a reason for hiding this comment

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

Thanks for taking the lead on this, @howard-e!

docs/release.md Outdated
## Branching strategy

- Checkout the `development` branch after cloning (or forking) the repository
- Create an appropriately named 'feature', 'hotfix', 'patch', etc branch
Copy link
Contributor

Choose a reason for hiding this comment

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

It's a little unorthodox to restrict folks' branch names (especially in the ideal case that the pull requests are coming from external forks), but if we want to do this, I think a little more guidance will be necessary.

Copy link
Contributor Author

@howard-e howard-e Feb 7, 2024

Choose a reason for hiding this comment

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

... to restrict folks' branch names ...

Correct and definitely not the intention of the line. Reading it back now, I also see how it can be interpreted as such. I'll simplify it to "Create an appropriately named branch"

Done in 610dc55

docs/release.md Outdated Show resolved Hide resolved
Comment on lines +11 to +14
jobs:
version-changelog-update:
permissions:
contents: write
Copy link
Contributor

Choose a reason for hiding this comment

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

How about we require the tests to pass? I believe the syntax would be:

 jobs:
+  tests:
+    uses: ./.github/workflows/runtest.yml
   version-changelog-update:
+    needs: tests
     permissions:
       contents: write

Along with a corresponding addition of workflow_call to runtest.yml.

Copy link
Contributor Author

@howard-e howard-e Feb 7, 2024

Choose a reason for hiding this comment

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

I like the thought, although I would have liked to hope the tests were confirmed as passing to have even got there? Seems doing something like the following in runtest.yml to avoid doubling up on that run should be done:

# runtest.yml

on:
  push:
    branches-ignore:
      - releases # version-changelog-update which triggers on a push to releases will still trigger this workflow through `workflow_call`
  pull_request:
  workflow_call:

Seems useful as well on #912, for an automated deployment.

@jugglinmike
Copy link
Contributor

...or we might disable pushing to the branch and instead only merge via GitHub pull request. That would likewise allow us to require that the tests pass, and it would also make the release process more visible.

@howard-e
Copy link
Contributor Author

howard-e commented Feb 7, 2024

...or we might disable pushing to the branch and instead only merge via GitHub pull request. That would likewise allow us to require that the tests pass, and it would also make the release process more visible.

That would be fine with me! I think that also addresses my thought in the previous thread:

although I would have liked to hope the tests were confirmed as passing to have even got there

Copy link
Contributor

@alflennik alflennik left a comment

Choose a reason for hiding this comment

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

Great work, it is exciting to see our workflow entering the next phase, and having seen all the manual work needed to track our releases, this will be a huge efficiency boost.

@howard-e I know I'm the second reviewer but can you merge this? There are other reviewers assigned, and it seems like we might need to create a new development branch so I wanted to leave that to you. Also when you do merge it, would you mind sending a notification to the team so they know to update their practices?

docs/release.md Outdated Show resolved Hide resolved
docs/release.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
docs/release.md Outdated Show resolved Hide resolved
docs/release.md Outdated Show resolved Hide resolved
@howard-e howard-e merged commit f981da8 into main Apr 4, 2024
2 checks passed
@howard-e howard-e deleted the version_changelog_update branch April 4, 2024 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In production / Completed
Development

Successfully merging this pull request may close these issues.

3 participants