From b9ddb66318c59c5542640c3fff09695169c7be39 Mon Sep 17 00:00:00 2001 From: Mark Gee Date: Mon, 20 Jul 2026 11:44:13 +0100 Subject: [PATCH] ci: set git identity for release tag; add manual dispatch The tag step failed with 'empty ident name' because no git user was configured. Set the github-actions bot identity before tagging. Also add workflow_dispatch so the publish can be re-run manually (version read from the manifest on main). --- .github/workflows/release-publish.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index a04286f..784d5ec 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -20,13 +20,15 @@ name: release-publish on: pull_request: types: [closed] + workflow_dispatch: {} # manual re-run (reads the version from the manifest on main) jobs: build: - # Only when a PR labeled `release` is actually merged. + # A merged PR labeled `release`, or a manual dispatch. if: >- - github.event.pull_request.merged == true && - contains(github.event.pull_request.labels.*.name, 'release') + github.event_name == 'workflow_dispatch' || + (github.event.pull_request.merged == true && + contains(github.event.pull_request.labels.*.name, 'release')) runs-on: ubuntu-latest permissions: contents: write # push the release tag @@ -38,12 +40,14 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ github.event.pull_request.merge_commit_sha }} + ref: ${{ github.event.pull_request.merge_commit_sha || github.sha }} fetch-depth: 0 - name: Resolve version + create tag id: resolve run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" TAG="v$(jq -r '."."' .release-please-manifest.json)" echo "tag=${TAG}" >> "$GITHUB_OUTPUT" git tag -a "${TAG}" -m "${TAG}"