Files
sencho/.github/workflows/release-please.yml
T
Anso 7b7edc72bb ci: add workflow_dispatch trigger to release-please (#865)
release-please-action v5.0.0 (release-please library 17.6.0) returns
exit code 1 when it tries to create a GitHub Release whose tag already
exists, even when the underlying state is consistent (release already
published, manifest current, label state correct). This causes the
action to abort before the "open or update release PR" step, leaving
new conventional commits unprocessed.

Adding workflow_dispatch lets a maintainer re-run the action manually
from the Actions tab once the inconsistent state is cleared (typically
by removing the autorelease label from the prior release PR), without
needing to push a no-op commit to main to retrigger.

The workflow's internal state checks still run on every dispatch, so
manual triggers cannot double-publish a release. release-please-action
is already at latest (v5.0.0, 2026-04-22) so a version bump is not an
option until upstream ships a fix for the duplicate-tag handling.
2026-05-01 21:21:19 -04:00

46 lines
1.8 KiB
YAML

name: Release Please
on:
push:
branches:
- main
# Manual recovery lever for cases where the action fails on a transient
# GitHub API issue (e.g. duplicate-release-tag during a retry) and exits
# before scanning main for new conventional commits. Re-running from the
# Actions tab requeues the same logic against the current main HEAD; no
# code push needed. Triggering manually does NOT skip the action's own
# state checks, so it cannot accidentally double-publish a release.
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
steps:
# Mint a short-lived installation token for the `sencho-token-app`
# GitHub App instead of using a long-lived user PAT. The token:
# - is scoped to this one repository (least privilege)
# - requests only the permissions release-please actually needs
# - is auto-revoked by the action's post step at job end
# - unlike GITHUB_TOKEN, CAN trigger downstream workflow runs, so the
# tag push from release-please still cascades to docker-publish.yml
- name: Generate GitHub App installation token
id: app-token
uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: Sencho
permission-contents: write
permission-pull-requests: write
- uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
with:
token: ${{ steps.app-token.outputs.token }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json