tree: 60792d92a266b0c13db6f9caa9915930adac9201 [path history] [tgz]
  1. action.yml
  2. Dockerfile
  3. entrypoint.sh
  4. increment_version.sh
  5. README.md
post-release/README.md

post-release Action

Purpose: Handles Repository Setup for the next Release Version

A GitHub Action that handles steps necessary to close out a GitHub Release process. This includes:

  1. Creating a branch of named like merge-back-TAGNAME that will:
    • Include the tag changes to prevent orphaned changes.
    • Include changing the projectVersion or version property in gradle.properties to the next version.
  2. Optionally closing the current milestone associated with the release.
  3. Optionally running an additional script as part of the close process to transform files in the repository.
  4. Removing the prerelease flag 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.

Requirements

  1. 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”.
  2. Requires the permission contents: write to 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.
  3. Optionally requires the permission pull-requests: write to open the pull request to merge back changes from the tag. If this permission is not set, a Pull Request will not be created.
  4. Optionally requires the permission issues: write if milestone closing is required.

Environment Variables

  • (optional) RELEASE_VERSION - The version of the release being closed. If not set, it will be derived from the GITHUB_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 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 property file defined by PROPERTY_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.

Example Usage

Basic Usage:

      - name: "⚙️ Run post-release"
        uses: apache/grails-github-actions/post-release@asf

Running 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'