Skip to content

release-app.yml

Create releases using release-please, optionally tag major/minor versions, and support automerge of generated PRs.

Inputs

InputTypeDescriptionRequiredDefault
ENABLE_PRERELEASEbooleanEnable prerelease functionalityNofalse
TAG_MAJOR_AND_MINORbooleanTag major and minor versionsNofalse
AUTOMERGE_PRERELEASEbooleanAutomatically merge the prerelease PRNofalse
AUTOMERGE_RELEASEbooleanAutomatically merge the release PRNofalse
PRERELEASE_BRANCHstringBranch to create the prerelease onNodevelop
RELEASE_BRANCHstringBranch to create the release onNomain
REBASE_PRERELEASE_BRANCHbooleanRebase prerelease branch on release after releaseNofalse
RELEASE_CONFIG_FILEstringRelease-please config file for release branchNorelease-please-config.json
RELEASE_MANIFEST_FILEstringRelease-please manifest file for release branchNo.release-please-manifest.json
PRERELEASE_CONFIG_FILEstringRelease-please config file for prerelease branchNorelease-please-config-rc.json
PRERELEASE_MANIFEST_FILEstringRelease-please manifest file for prerelease branchNo.release-please-manifest-rc.json

Secrets

SecretDescriptionRequiredDefault
GH_PATGitHub Personal Access Token (required for automerge)No-

Outputs

OutputDescription
release-createdWhether a release was created in this run
major-tagMajor version tag (e.g., 1)
minor-tagMinor version tag (e.g., 2)
patch-tagPatch version tag (e.g., 3)

Permissions

ScopeAccessDescription
contentswriteCreate tags/commits and update manifest files
issueswriteCreate or update issues opened by release tooling
pull-requestswriteCreate, update, and optionally merge release PRs

Notes

  • Set ENABLE_PRERELEASE: false to disable all prerelease functionality and work only with release branches.
  • Config and manifest files are configurable via inputs, with sensible defaults for both release and prerelease workflows.
  • On RELEASE_BRANCH (default main), uses the files specified by RELEASE_CONFIG_FILE and RELEASE_MANIFEST_FILE.
  • On PRERELEASE_BRANCH (default develop), uses the files specified by PRERELEASE_CONFIG_FILE and PRERELEASE_MANIFEST_FILE (only when ENABLE_PRERELEASE: true).
  • If TAG_MAJOR_AND_MINOR: true, tags v<major> and v<major>.<minor> after a release is created.
  • If AUTOMERGE_* is enabled and a PAT is provided, attempts to automerge the release PR.
  • Optionally rebases PRERELEASE_BRANCH onto RELEASE_BRANCH after a release when REBASE_PRERELEASE_BRANCH: true (only when ENABLE_PRERELEASE: true).

Examples

Simple example

yaml
jobs:
  release:
    uses: this-is-tobi/github-workflows/.github/workflows/release-app.yml@main
    with:
      ENABLE_PRERELEASE: true
      TAG_MAJOR_AND_MINOR: true
      AUTOMERGE_PRERELEASE: true
      AUTOMERGE_RELEASE: true
      REBASE_PRERELEASE_BRANCH: true
      # Optional: customize config and manifest files
      RELEASE_CONFIG_FILE: custom-release-config.json
      PRERELEASE_CONFIG_FILE: custom-prerelease-config.json
    secrets:
      GH_PAT: ${{ secrets.GH_PAT }}

Release-only workflow

yaml
jobs:
  release:
    uses: this-is-tobi/github-workflows/.github/workflows/release-app.yml@main
    with:
      ENABLE_PRERELEASE: false
      TAG_MAJOR_AND_MINOR: true
      AUTOMERGE_RELEASE: true
    secrets:
      GH_PAT: ${{ secrets.GH_PAT }}