A GitHub Action that handles steps necessary to close out a GitHub Release process. This includes:
- Creating a branch of named like
merge-back-TAGNAMEthat will:- Include the tag changes to prevent orphaned changes.
- Include changing the
projectVersionorversionproperty ingradle.propertiesto the next version.
- Optionally closing the current milestone associated with the release.
- Optionally running an additional script as part of the close process to transform files in the repository.
- Removing the
prereleaseflag from the release & setting the release to the latest GitHub release.
Please note that the next version is derived from the provided RELEASE_VERSION using a script that assumes a Semantic Version.
- Github Actions must be allowed to create pull requests in the repository. You can configure this in the repository settings under "Actions" -> "General" -> "Workflow permissions".
- Requires the permission
contents: writeto create a branch, commit changes to the repository, update the GitHub release to no longer be a pre-release, and update the GitHub release to be the latest. - Optionally requires the permission
pull-requests: writeto open the pull request to merge back changes from the tag. If this permission is not set, a Pull Request will not be created. - Optionally requires the permission
issues: writeif milestone closing is required.
- (optional)
RELEASE_VERSION- The version of the release being closed. If not set, it will be derived from theGITHUB_REF, which as part of a release will be the tag name. - (optional)
RELEASE_TAG_PREFIX- The prefix of the release tag. If not set, it will default tov(e.g.,v1.0.0). - (optional)
PROPERTY_FILE_NAME- defaults togradle.properties, the property file containing the version property to update - (optional)
PR_LABELS- comma-separated labels to apply to the merge-back pull request after it is created or reused - (optional)
RELEASE_SCRIPT_PATH- An optional path to a custom shell script that will be executed after the version replacement in property file defined byPROPERTY_FILE_NAME, but prior to commiting the project changes. - (optional)
RELEASE_LATEST- An optional boolean flag to update the GitHub release to be or not to be the latest. If not defined, no update will be performed. - (optional)
RELEASE_PRE_RELEASE- An optional boolean flag to update the GitHub release to be or not to be a pre-release. If not defined, no update will be performed.
Basic Usage:
- name: "⚙️ Run post-release"
uses: apache/grails-github-actions/post-release@asfRunning a custom script myScript.sh that's checked in under .github/scripts:
- name: "⚙️ Run post-release"
uses: apache/grails-github-actions/post-release@asf
env:
RELEASE_SCRIPT_PATH: '.github/scripts/myScript.sh'Adding labels to the merge-back pull request:
- name: "⚙️ Run post-release"
uses: apache/grails-github-actions/post-release@asf
with:
pr-labels: skip-changelog,internal-release