GitHub Action
release-train
hop on the release train
default: ${{ github.event_name == 'pull_request' }}
Instead of releasing, check that the PR has a label indicating the type of change. Only literal 'true' will be treated as true.
default: ${{ github.workspace }}
The directory where the repository is checked out.
default: ${{ github.ref }}
The branch or tag to release.
default: ${{ github.token }}
The GitHub token to use for authentication. Must have contents: write
permission if creating a release or tag.
Whether to create a tag for the release. Only literal 'true' will be treated as true.
Whether to create a release. Only literal 'true' will be treated as true.
Implies create_tag
.
default: v
The prefix to use for the tag. Defaults to v
.
default: 0.0.0
The default previous version to use if no previous version can be found. This is used to for the first release.
Set to empty string to disable cause it to error if no previous version can be found.
Command to run before creating the release. You may abort the release by exiting with a non-zero exit code.
Exit code 0 will continue the release. Exit code 10 will skip the release without error. Any other exit code will abort the release with an error.
You may provide custom release notes by writing to the file at $RELEASE_NOTES_FILE
:
echo "my release notes" > "$RELEASE_NOTES_FILE"
The environment variables RELEASE_VERSION
, RELEASE_TAG
, PREVIOUS_VERSION
, FIRST_RELEASE
, GITHUB_TOKEN
,
and RELEASE_NOTES_FILE
will be set.
Command to run after the release is complete. This is useful for adding artifacts to your release.
The environment variables RELEASE_VERSION
, RELEASE_TAG
, PREVIOUS_VERSION
, FIRST_RELEASE
and GITHUB_TOKEN
will be set.
Validates that the name of the go module at the given path matches the major version of the release. For example,
validation will fail when releasing v3.0.0 when the module name is my_go_module/v2
.
The path provided must be relative to inputs.checkout_dir.
Release train uses whatever version of go is in PATH. If you need to use a specific version of go, you can use
WillAbides/setup-go-faster
to install it.
If set to true, this will be a no-op. This is useful for creating a new repository or branch that isn't ready for release yet.
Only literal 'true' will be treated as true.
Deprecated - Use pre_release_hook
instead.
The release notes to use for the release. If not provided, release notes will be generated by GitHub's release notes generator.
Ignored unless create_release is set.
Deprecated - Use pre_release_hook
instead.
Alias for pre_release_hook
.
A git ref pointing to the previous release, or the current ref if no previous release can be found.
The previous version on the release branch.
Whether this is the first release on the release branch. Either "true" or "false".
The version of the new release. Empty if no release is called for.
The tag of the new release. Empty if no release is called for.