Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

pre-release Action

Purpose: Handles Tag updates to ensure the Release Version is set

A GitHub action that handles any pre-release steps as part of a GitHub release process. This includes:

  1. Updating the projectVersion or version in gradle.properties to match the tag version.
  2. Optionally running an additional script as part of the projectVersion change to transform files in the repository.
  3. Commiting changes from 1 & 2 above and force pushing an update to the tag.
  4. Moving the release back from draft to published because 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.

Requirements

  1. Requires the permission contents: write to update the tag & release.

Environment Variables

  • (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 to v (e.g., v1.0.0).
  • (optional) PROPERTY_FILE_NAME - defaults to gradle.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 by PROPERTY_FILE_NAME, but prior to commiting the project changes.

Example Usage

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'