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

Add pre-release support #538

Open
jenstroeger opened this issue May 6, 2023 · 4 comments
Open

Add pre-release support #538

jenstroeger opened this issue May 6, 2023 · 4 comments

Comments

@jenstroeger
Copy link
Owner

jenstroeger commented May 6, 2023

Currently

The release workflows support only final releases of a package, and no pre-releases. The branches support these release workflows by PR → staging branch → main branch, where a push to the main branch triggers building and publishing a final package release.

Proposal

We want to add support for building and publishing pre-releases of the package. To achieve that we can add the following workflows to the staging branch that trigger on push event:

  1. If the commit log shows a release will be build (i.e. there’s at least one fix: or feat: or breaking change) then
    1. Build all release artifacts; then
    2. Bump the package’s version using commitizen’s --prerelease option, e.g. using rc for release candidates, and push the new tag; then
    3. Create a pre-release on Github and attach the pre-release build artifacts.

We can probably refactor the current release.yaml into two workflows:

  1. release-rc.yaml that triggers on push to the staging branch and produces a pre-release; and
  2. release.yaml that (much like its current incarnation) triggers on push to the main branch and produces a final release,

both of which can make use of two new reusable workflows that

  • Build and bump a branch; and
  • Create a Github release and publish the artifacts.

For this to work, we also need the following two features available:

@jenstroeger
Copy link
Owner Author

After some tinkering with cz I think this feature needs to wait:

For reference, there’s also an interesting Discussion: pre-release versioning and PEP440 cross-compatibility.

@jenstroeger
Copy link
Owner Author

And just out: v1.6.0 of the SLSA Generator added support for pre-releases as well 👍🏼

@behnazh
Copy link
Collaborator

behnazh commented Sep 2, 2023

I think this would make sense if apart from the main and staging branches, there are additional ones for pre-releases.

@jenstroeger
Copy link
Owner Author

Commitizen v3.14.0 add support for pre-release bumps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants