Skip to content

Release

Automates releases using release-please. Opens release PRs, creates GitHub Releases, and keeps the v<major> tag alias in sync.

Usage

yaml
jobs:
  release:
    uses: KevinDeBenedetti/github-workflows/.github/workflows/release.yml@main
    with:
      config-file: release-please-config.json
      manifest-file: .release-please-manifest.json
      git-user-name: ${{ secrets.GITHUB_USERNAME }}
      git-user-email: ${{ secrets.GITHUB_EMAIL }}
    secrets:
      RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}

Inputs

InputTypeDefaultDescription
release-typestring''release-please release type (e.g. node, python, simple). Ignored when config-file is set.
config-filestringrelease-please-config.jsonPath to release-please-config.json
manifest-filestring.release-please-manifest.jsonPath to .release-please-manifest.json
git-user-namestringgithub-actions[bot]Name used for the git tagger identity when moving the major version tag
git-user-emailstringgithub-actions[bot]@users.noreply.github.comEmail used for the git tagger identity when moving the major version tag

Secrets

SecretRequiredDescription
RELEASE_TOKENnoPAT with contents: write and pull-requests: write. Falls back to GITHUB_TOKEN.

Outputs

OutputDescription
released'true' if a GitHub Release was created
tagTag name of the release (e.g. v1.2.3)

Jobs

JobDescription
releaseRuns release-please; creates release PR or GitHub Release
tag-workflowsMoves the v<major> alias tag after each release

Notes

  • The tag-workflows job only runs when released == 'true'.
  • The major alias (e.g. v1) is force-pushed after each release, enabling callers to pin to @v1 without a breaking update.
  • When using a monorepo, prefer config-file + manifest-file over release-type.