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 Release Process #656

Closed
skorfmann opened this issue Apr 21, 2021 · 11 comments
Closed

Automate Release Process #656

skorfmann opened this issue Apr 21, 2021 · 11 comments
Assignees
Labels

Comments

@skorfmann
Copy link
Contributor

skorfmann commented Apr 21, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

We should have an automated process to create PRs for a new release. Let's use https://github.com/semantic-release/semantic-release or something similar and use conventional titles for PRs which can be enforced with an GH Action like this

The workflow I'm imagining:

  • Regularly merged PRs to main will trigger a pre-release (see Package Pre Release Versioning #561 as well) - no changes required as part of this issue
  • A manually created release PR contains all the required changes generated by the semantic release tooling (version and changelog)
  • The actual package release pipeline should stay as it is

For the PR validation, a config like this should work (inspired by this):

scopes:
  - lib
  - cli
  - hcl2json
  - examples
  - readme
  - docs
  - release
  - deps

types:
  - feat
  - fix
  - chore
  - refactor
  - revert
@skorfmann skorfmann added the enhancement New feature or request label Apr 21, 2021
@skorfmann skorfmann added this to the v0.4 milestone Apr 22, 2021
@DanielMSchmidt
Copy link
Contributor

Looking deeper into Semantic release it looks like having one branch for pre-releases and one for releases would be the best supported use-cases. Releasing would mean that we do a PR between the pre-release branch and the main branch.

@DanielMSchmidt
Copy link
Contributor

Another way would be using the exec plugin with a verifyConditionsCmd command that checks if e.g. a tag is set and whatever we need to check as well. The script would abort the release if the condition is not met.

@jsteinich
Copy link
Collaborator

Using the full version of Semantic release definitely seems to push towards multiple branches. That seems like it will make sense once there is a 1.0 release (or Terraform type releases), but probably isn't the best right now.
While it may be possible to configure the full version to do what we want, using exec (or even just the release notes generation) might get most of what will be helpful here. Could also look at doing manual release control only (see https://github.com/semantic-release/semantic-release/blob/master/docs/recipes/github-actions.md#trigger-semantic-release-on-demand).

@skorfmann
Copy link
Contributor Author

Looking deeper into Semantic release it looks like having one branch for pre-releases and one for releases would be the best supported use-cases. Releasing would mean that we do a PR between the pre-release branch and the main branch.

Pretty much what @jsteinich said - this will make sense when approaching 1.0 - Right now I'd keep the workflow rather simple.

I think the biggest pain is really the release notes / changelog generation.

@skorfmann skorfmann self-assigned this May 25, 2021
@skorfmann skorfmann changed the title Automate Release Process chore(tests): Automate Release Process May 25, 2021
@skorfmann skorfmann changed the title chore(tests): Automate Release Process Automate Release Process May 25, 2021
@skorfmann
Copy link
Contributor Author

Perhaps we should really just focus on the changelog for now. e.g. there's https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-cli - however, didn't get to consider merge commits only.

Anyone has other tooling ideas to generate changelogs?

@RichiCoder1
Copy link

RichiCoder1 commented May 27, 2021

There's a tool by Atlassian for changeset management: https://github.com/atlassian/changesets.
Its release functionality is very NPM specific, but the changeset functionality is generic.

@DanielMSchmidt
Copy link
Contributor

I stumbled upon another option: If we use semantic release beta releases on master we could do the real releases in a github action that does not automatically run, but is triggered manually by us. This way we have control over minor releases and automatic beta releases

@skorfmann
Copy link
Contributor Author

I stumbled upon another option: If we use semantic release beta releases on master we could do the real releases in a github action that does not automatically run, but is triggered manually by us. This way we have control over minor releases and automatic beta releases

What we're primary looking is two things:

  1. Generating a Changelog
  2. Bumping the version

The rest is taken care of by jsii-release already. If that fits in the workflow of semantic release that's worth a try.

@DanielMSchmidt
Copy link
Contributor

DanielMSchmidt commented May 31, 2021 via email

@ansgarm ansgarm modified the milestones: v0.4, v0.4.x Jun 2, 2021
@danieldreier danieldreier modified the milestones: v0.4.x, 0.5 Jun 25, 2021
@danieldreier danieldreier added build and removed enhancement New feature or request labels Jun 25, 2021
@danieldreier danieldreier removed this from the 0.5 milestone Jun 25, 2021
@DanielMSchmidt
Copy link
Contributor

This is solved by #1257 together with the changelog creation script we have in place

@github-actions
Copy link
Contributor

I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants