Files
sencho/.github/workflows/release-please.yml
T
dependabot[bot] 331dbe8339 chore(deps): bump the all-actions group across 2 directories with 3 updates (#1637)
Bumps the all-actions group with 3 updates in the / directory: [actions/setup-node](https://github.com/actions/setup-node), [softprops/action-gh-release](https://github.com/softprops/action-gh-release) and [actions/stale](https://github.com/actions/stale).
Bumps the all-actions group with 1 update in the /.github/actions/start-app directory: [actions/setup-node](https://github.com/actions/setup-node).


Updates `actions/setup-node` from 6.4.0 to 7.0.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e...820762786026740c76f36085b0efc47a31fe5020)

Updates `softprops/action-gh-release` from 3.0.1 to 3.0.2
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/718ea10b132b3b2eba29c1007bb80653f286566b...3d0d9888cb7fd7b750713d6e236d1fcb99157228)

Updates `actions/stale` from 10.3.0 to 10.4.0
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/eb5cf3af3ac0a1aa4c9c45633dd1ae542a27a899...1e223db275d687790206a7acac4d1a11bd6fe629)

Updates `actions/setup-node` from 6.4.0 to 7.0.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e...820762786026740c76f36085b0efc47a31fe5020)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: all-actions
- dependency-name: softprops/action-gh-release
  dependency-version: 3.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-actions
- dependency-name: actions/stale
  dependency-version: 10.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-actions
- dependency-name: actions/setup-node
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: all-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-15 21:24:39 -04:00

86 lines
3.5 KiB
YAML

name: Release Please
concurrency:
group: release-please-${{ github.ref }}
cancel-in-progress: false
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@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
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
permission-issues: read
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
token: ${{ steps.app-token.outputs.token }}
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v6
with:
node-version-file: '.node-version'
- id: release
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
- name: Credit external contributors in changelog
if: ${{ steps.release.outputs.prs_created == 'true' }}
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
GITHUB_REPOSITORY: ${{ github.repository }}
# fromJSON must tolerate empty pr: env is evaluated even when if: skips
# (publish runs leave pr unset). Empty object yields empty RELEASE_BRANCH.
RELEASE_BRANCH: ${{ fromJSON(steps.release.outputs.pr || '{}').headBranchName || '' }}
MAINTAINER_LOGINS: ""
run: |
if [ -z "$RELEASE_BRANCH" ]; then
echo "RELEASE_BRANCH is empty; aborting."
exit 1
fi
cp scripts/credit-changelog-contributors.mjs "$RUNNER_TEMP/"
git fetch origin "$RELEASE_BRANCH"
git checkout "$RELEASE_BRANCH"
node "$RUNNER_TEMP/credit-changelog-contributors.mjs"
if [ -n "$(git status --porcelain CHANGELOG.md)" ]; then
git config user.name "sencho-quartermaster[bot]"
git config user.email "275163604+sencho-quartermaster[bot]@users.noreply.github.com"
git add CHANGELOG.md
git commit -m "chore: credit external contributors in changelog"
git push origin "HEAD:$RELEASE_BRANCH"
fi