-
Notifications
You must be signed in to change notification settings - Fork 208
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
Conversation
3457fe3
to
163e906
Compare
.github/workflows/release.yml
Outdated
@@ -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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 👍
Added support for release candidates. To be consistent with previous releases, release candidates use an upper-cased 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. |
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 of1.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 is1.19.4dev
, it will only be able to release1.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
becomes1.19.5dev
, with the build number reset to 01.19.4alpha1
or1.19.4beta1
become1.19.4dev
with the build number increasedI've tested creating an alpha and a beta release and things work as expected 👍