Opinionated, customizable GitHub Action to publish releases out of pushed v* tags.
This is a generalization that collects patterns from the workflows used in Quarkdown and other personal projects from my past decade in OSS.
Each feature is opt-in.
-
Tagged release: publishes the release with a composed body and artifacts.
-
Version-file bump: writes the tag into a file like
version.txtreadable by downstream tools, such as build scripts or--versionflags. -
Changelog update and extraction: extracts the
[Unreleased]section in a keep-a-changelog file, turns it into a dated release section, and uses it to compose the release body. -
Release notes extraction: extracts the notes for the current tag from the changelog.
-
Devbuild prerelease: moves a rolling tag to the current commit and publishes a prerelease with attached artifacts as a nightly build.
-
Major-version tag alias: extracts and pushes the major from the tag (
v2.3.4→v2), ideal for pinning versions in GitHub Actions (dogfooded in this very action).
name: Release
on:
push:
tags: ['v*']
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: iamgio/simple-release@v1
with:
version-file: version.txt
changelog-file: CHANGELOG.md
commit: 'true'
release-files: |
build/dist/*.zip
build/dist/*.tar.gzname: Devbuild
on:
push:
branches: [main]
permissions:
contents: write
jobs:
devbuild:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: iamgio/simple-release@v1
with:
devbuild-tag: latest
devbuild-files: build/dist/*.zipThe following lets a push of a v2.3.4 tag publish a release and force-move the v2 tag to the same commit:
name: Release
on:
push:
tags: ['v*.*.*']
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: iamgio/simple-release@v1
with:
release: 'true'
major-tag: 'true'| Input | Default | Description |
|---|---|---|
|
|
Tag for the release. |
|
|
Token used to create the releases. |
|
Falls back to |
Token for pushing commits and moving tags. Use a PAT if needed. |
| Input | Default | Description |
|---|---|---|
|
|
Path to a file to overwrite with the version. Leave empty to skip. |
|
|
When |
| Input | Default | Description |
|---|---|---|
|
|
Path to a keep-a-changelog file. Leave empty to skip. |
|
|
Turn |
|
|
Extract release notes for the tag from the changelog into the |
| Input | Default | Description |
|---|---|---|
|
|
If set and the file exists, its content is appended after the release notes in the release body. |
| Input | Default | Description |
|---|---|---|
|
|
When |
| Input | Default | Description |
|---|---|---|
|
|
Commit the modified |
|
|
|
|
|
Name used for the auto-commit author. |
|
|
Email used for the auto-commit author. |
|
|
Branch to push the commit to. |
| Input | Default | Description |
|---|---|---|
|
|
Name of the rolling tag to force-move to this commit (e.g. |
|
|
Display name for the prerelease. |
|
|
Newline- or comma-separated glob patterns of files to attach. |
| Input | Default | Description |
|---|---|---|
|
|
|
|
Tag name |
Release display name. |
|
Composed |
Literal Markdown body. If empty, composed from release notes and the append file. |
|
|
Newline- or comma-separated glob patterns of files to attach. |
|
|
Whether the release should be created as a draft. |
|
|
Whether the release should be marked as a prerelease. |
| Output | Description |
|---|---|
|
The computed version (tag with leading |
|
Whether the workflow ref is a tag. |
|
Extracted release notes for the tag, if the changelog step ran. |
|
URL of the created release, if any. |
|
URL of the created devbuild release, if any. |
The calling workflow needs contents: write for any step that pushes tags,
commits, or creates releases. When commit-back or devbuild-tag pushing must
target a protected branch, pass a PAT as committer-token.
This action wraps several great community actions: