A GitHub action that handles any pre-release steps as part of a GitHub release process. This includes:
- Updating the
projectVersionorversioningradle.propertiesto match the tag version. - Optionally running an additional script as part of the
projectVersionchange to transform files in the repository. - Commiting changes from 1 & 2 above and force pushing an update to the tag.
- Moving the release back from
drafttopublishedbecause of the tag update.
Please note that this action allows users to simply create a GitHub release and this action handles matching the version of the GitHub release to the checked in version.
- Requires the permission
contents: writeto update the tag & release.
- (required)
RELEASE_VERSION- The version of the release being created. - (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)
RELEASE_SCRIPT_PATH- An optional path to a custom shell script that will be executed after the version replacement in the property file defined byPROPERTY_FILE_NAME, but prior to commiting the project changes.
Basic Usage:
- name: '⚙️ Run pre-release'
uses: apache/grails-github-actions/pre-release@asf
env:
RELEASE_VERSION: ${{ steps.release_version.outputs.value }}Running a custom script myScript.sh that's checked in under .github/scripts:
- name: '⚙️ Run pre-release'
uses: apache/grails-github-actions/pre-release@asf
env:
RELEASE_VERSION: ${{ steps.release_version.outputs.value }}
RELEASE_SCRIPT_PATH: '.github/scripts/myScript.sh'