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

ci: Create GitHub Release automatically #9

Merged
merged 3 commits into from
Sep 6, 2022
Merged

ci: Create GitHub Release automatically #9

merged 3 commits into from
Sep 6, 2022

Conversation

leandro-lucarella-frequenz

Add a GitHub job to create the GitHub Release automatically when a version is tagged. Also use the GitHub feature to create the CHANGELOG automatically. For this the CHANGELOG.md is removed in favor of a RELEASE_NOTES.md files that should only contain an explanation on the release main changes.

Also add the release notes for the current release.

Add a GitHub job to create the GitHub Release automatically when
a version is tagged. Also use the GitHub feature to create the CHANGELOG
automatically. For this the CHANGELOG.md is removed in favor of
a RELEASE_NOTES.md files that should only contain an explanation on the
release main changes.

Also add the release notes for the current release.

Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
@leandro-lucarella-frequenz leandro-lucarella-frequenz added the type:tech-debt Improves the project without visible changes for users label Sep 5, 2022
@leandro-lucarella-frequenz leandro-lucarella-frequenz added this to the v0.11.0 milestone Sep 5, 2022
@github-actions github-actions bot added part:docs Affects the documentation part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) labels Sep 5, 2022
@leandro-lucarella-frequenz
Copy link
Author

This PR is also a RFC because it changes the way we build the CHANGELOG. I noticed there is a lot of manual work while GitHub is providing the same automatically for free, so what I'm proposing is to stop wringing a CHANGELOG.md and write a RELEASE_NOTES.md with a more high-level description of what was mainly changed in the release. Here we should include steps needed to migrate from previous versions, examples on new features, etc.

This is how the generated release notes look like:

https://github.com/leandro-lucarella-frequenz/frequenz-api-microgrid-proto/releases/tag/untagged-45de1f171a0afe9f6be2

Everything above What's Changed is the contents of RELEASE_NOTES.md and everything below it was automatically generated by GitHub.

The main advantage is to reduce manual work (we are basically doing the same GH does automatically by listing PRs), the downside is there is no static CHANGELOG (we use the releases page from GH as CHANGELOG).

@leandro-lucarella-frequenz
Copy link
Author

ping @tiyash-basu-frequenz @matthias-wende-frequenz @ela-kotulska-frequenz because I'm suggesting a change in the way we do releases and write changelogs / release notes.

@sahas-subramanian-frequenz

So we create tags locally and push? Or is there a way to create tags on gh without a release?

@leandro-lucarella-frequenz
Copy link
Author

So we create tags locally and push? Or is there a way to create tags on gh without a release?

Yeah, I just added the steps to release to the guide. Just tag and push.

When a new release is created, the RELEASE_NOTES.md file can be easily
reset with a convenient template.

Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
All the content of the README.md file that refers to development is
moved to the CONTRIBUTING.md guide, as the README.md should be more
targeted to users rather than developers (as it is used for the PyPI
page too).

Add also the steps to create a release to the contributing guide.

Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
@leandro-lucarella-frequenz
Copy link
Author

So we create tags locally and push? Or is there a way to create tags on gh without a release?

I didn't thought about creating release+tag via the GH UI but I considered create a release in GitHub and trigger the uploading of the packages to PyPI from that event, but always thinking about pushing a tag first. I found it more complicated, because we should either repeat all the tests for the release event or find a way to wait until the tag is tested to make the release. I thought this workflow was simpler: tag triggers -> create release and upload packages.

If both creating the GH release and the tag are done in the UI I think is simpler, but maybe a bit less resilient if someone wants to create the tag first from the CLI or something.

Copy link
Contributor

@tiyash-basu-frequenz tiyash-basu-frequenz left a comment

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
part:docs Affects the documentation part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) type:tech-debt Improves the project without visible changes for users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants