Skip to content

PHPC-2381: Allow releasing pre-release versions through the release automation #1590

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

Merged
merged 5 commits into from
Jun 24, 2024

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Jun 18, 2024

PHPC-2381

This PR adds support for alpha and beta releases in the automated release tool. Note that since PECL doesn't have a stability constant for release candidates, so I haven't yet added support for them. However, it should be easy enough to add in case we want to do so.

This changes the version flow in phongo_version.h slightly. When setting the version information for a release (i.e. the "Package x.y.z" commit), the update-version tool exclusively uses the version given in the prompt. This version needs to be in valid PEAR version format, which omits a dash before the stability (e.g. 1.20.0alpha1 instead of 1.20.0-alpha1). The update-version tool also expects the release version to match the information already in phongo_version.h. For example, if the version is 1.19.4dev, it will only be able to release 1.19.4 including its pre-releases. Any other versions will yield an error.

After the release is done, the version is updated to the next version depending on the stability. For stable releases, the version is bumped to the next patch release. For all other stabilities, the release version is set back to a dev version of the same number, but the build number is increased. For example:

  • 1.19.4 becomes 1.19.5dev, with the build number reset to 0
  • 1.19.4alpha1 or 1.19.4beta1 become 1.19.4dev with the build number increased

I've tested creating an alpha and a beta release and things work as expected 👍

@alcaeus alcaeus force-pushed the allow-pre-release-automation branch from 3457fe3 to 163e906 Compare June 20, 2024 09:15
@alcaeus alcaeus marked this pull request as ready for review June 20, 2024 09:16
@alcaeus alcaeus requested a review from jmikola June 20, 2024 09:16
@@ -155,7 +136,11 @@ jobs:
EOL

- name: "Create draft release"
run: echo "RELEASE_URL=$(gh release create ${{ inputs.version }} --target ${{ github.ref_name }} --title "${{ inputs.version }}" --notes-file release-message --draft)" >> "$GITHUB_ENV"
run: |
if [[ "${{ inputs.version }}" =~ (alpha|beta) ]]; then
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't release candidates also be considered a prerelease? Those historically used "beta" stability in PECL.

Copy link
Member Author

Choose a reason for hiding this comment

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

Note that since PECL doesn't have a stability constant for release candidates, so I haven't yet added support for them. However, it should be easy enough to add in case we want to do so.

I'll take this as a "yes, let's support release candidates". I'll update the tooling accordingly 👍

@alcaeus
Copy link
Member Author

alcaeus commented Jun 21, 2024

Added support for release candidates. To be consistent with previous releases, release candidates use an upper-cased RC suffix, unlike alpha and beta which are lowercased.

The action also includes a sanity check for the version format, and I've removed the manual release instructions as these do not allow publishing any SSDLC assets.

@alcaeus alcaeus requested a review from jmikola June 21, 2024 08:48
@alcaeus alcaeus merged commit 2b545c3 into mongodb:v1.19 Jun 24, 2024
71 of 73 checks passed
@alcaeus alcaeus changed the title Allow releasing pre-release versions through the release automation PHPC-2381: Allow releasing pre-release versions through the release automation Jun 24, 2024
@alcaeus alcaeus deleted the allow-pre-release-automation branch September 23, 2024 07:28
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

Successfully merging this pull request may close these issues.

2 participants