Skip to content

Release Draft

Resolve version metadata, build a changelog, and create or update a draft GitHub release.

Usage

jobs:
  release:
    uses: athackst/ci/.github/workflows/release_drafter.yml@main
    secrets:
      token: ${{ secrets.CI_BOT_TOKEN }}

Inputs

Name Description Default
configuration-path (optional) Path to the release-drafter style config file. .github/ci-config.yml
name (optional) Explicit release name override. ""
tag-name (optional) Explicit release tag name override. ""
release-match-pattern (optional) Deprecated compatibility input; no longer used for draft lookup. ^v[0-9.]+$
draft-release-id (optional) Explicit draft release ID to update directly before create fallback. ""
reuse-existing-draft (optional) Update an existing draft when no release ID or matching tag is found. true

Secrets

Name Description Default
token (optional) Token used to create or update the draft release. ${{ github.token }}

Outputs

Name Description
id Draft release ID.
name Draft release name.
tag-name Draft release tag name.
html-url Draft release HTML URL.
upload-url Draft release upload URL.
resolved-version Resolved semantic version used for defaults.
changelog Generated changelog markdown body.

Permissions

  • Requires contents: write to create or update releases.
  • Requires pull-requests: read for version/changelog resolution.

Advanced

  • Resolves config first with resolve-config, then feeds the same config into version resolution and changelog generation.
  • Uses the resolved version and generated changelog as the default release name, tag, and body inputs.
  • Supports caller overrides for release name and tag-name.
  • Supports optional direct update of a known draft release via draft-release-id.
  • Otherwise, updates a draft release with the resolved tag when one exists.
  • If no matching tag is found and reuse-existing-draft is true, updates the newest existing draft release.
  • If no release ID, matching tag, or reusable draft is available, creates a new draft release.
  • Checks out tags with full history so semantic version resolution can compare against prior tags.