A GitHub Action that creates a release-triggering PR summarizing dependency changes since the last release tag.
Designed for projects using release-please + Renovate, where dependency updates use chore(deps): commits that don't trigger releases. This action bridges that gap with a manual workflow trigger.
name: Prepare Release
on:
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
prepare-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: genu/prepare-release-action@v1
id: preparejqmust be available on the runner (included on GitHub-hosted runners)- A
package.jsonmust exist in the repository root fetch-depth: 0is required in the checkout step for full git history- Auto-merge requires branch protection with required status checks enabled
- Checks if there are unreleased commits since the last git tag
- Diffs
package.jsondependencies between the last tag and HEAD (updated, added, and removed) - Creates a branch (
prepare-release/<timestamp>), commits the change, and opens a PR with a summary like:updated @zenstackhq/orm ^3.4.2 → ^3.4.4, added new-pkg ^1.0.0, removed old-pkg - Enables auto-merge (squash) on the PR by default, so it merges once status checks pass
| Input | Default | Description |
|---|---|---|
commit-type |
fix |
Conventional commit type for the trigger commit |
commit-scope |
deps |
Conventional commit scope |
commit-message |
update dependencies |
Commit message (without type/scope prefix) |
auto-merge |
true |
Enable auto-merge on the created PR |
pr-labels |
Comma-separated labels to apply to the PR |
| Output | Description |
|---|---|
committed |
true if a PR was created, false if there was nothing to release |
pr-url |
URL of the created pull request |
pr-number |
Number of the created pull request |