diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d01a883..480641f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,19 +3,26 @@ name: Release on: push: branches: [main] + # Recovery when GitHub created no run for a release push: replays that push's validation on the given commit. + workflow_dispatch: + inputs: + release-commit: + description: Full SHA of the release commit on main whose push produced no run + type: string + required: true permissions: contents: read concurrency: - group: release-${{ github.sha }} + group: release-${{ inputs.release-commit || github.sha }} cancel-in-progress: false jobs: release-tag: permissions: contents: write - uses: BehindTheMusicTree/github-workflows/.github/workflows/release-tag.yml@d2fa2ae24bb974bbb8c97a83a02b2325d4977d33 + uses: BehindTheMusicTree/github-workflows/.github/workflows/release-tag.yml@19ffb004a0aba2e96e106c8c956e11b8c5cc0df3 with: app-id: ${{ vars.RELEASE_APP_ID }} secrets: @@ -23,7 +30,7 @@ jobs: release-please: needs: release-tag - uses: BehindTheMusicTree/github-workflows/.github/workflows/release-please.yml@d2fa2ae24bb974bbb8c97a83a02b2325d4977d33 + uses: BehindTheMusicTree/github-workflows/.github/workflows/release-please.yml@19ffb004a0aba2e96e106c8c956e11b8c5cc0df3 with: app-id: ${{ vars.RELEASE_PR_APP_ID }} release-policies: .github/release-policy.json diff --git a/README.md b/README.md index 1e23cf9..d50b5cb 100644 --- a/README.md +++ b/README.md @@ -739,6 +739,8 @@ The run replays the lost push: it validates the range `parent..commit` with the GitHub can refuse the tag or the GitHub Release (HTTP 403, `Resource not accessible by integration`) when the release commit's `.github/workflows/` matches no branch tip, because `GITHUB_TOKEN` never holds the `workflows` permission and the release App is not granted it ([reported behaviour](https://github.com/mihazs/lazysh/pull/1196) for `GITHUB_TOKEN`, expected for the App too; not in GitHub's documentation). This happens when a workflow changed on `main` after the release commit. Push a temporary branch at that commit with your own credentials (`git push origin :refs/heads/recover-release`), dispatch again, then delete the branch. +The dispatch runs the reusable workflows pinned on `main`'s head, so a caller that had not adopted the trigger before the lost push must adopt it first: merge the pin bump with the trigger and the group (a `chore:` PR, whose own push run still fails reconciliation), then dispatch. Adopt it ahead of any outage. Once the recovered tag exists, re-run the failed jobs of the latest push run so release-please reconciles and opens the next release PR. + PyPI publish attestations of a recovered package name the dispatched run's commit (`main`'s head) as their source digest, not the tagged commit: the digest comes from the run's OIDC `sha` claim ([Fulcio](https://github.com/sigstore/fulcio/blob/main/docs/oid-info.md)). The files themselves are built from the tagged commit. **Deprecated:** `release-github.yml`, and the pattern of a tag-push workflow that calls it, remain only for callers not yet migrated (currently `the-music-tree-pipelines`, `hear-the-music-tree-api` and `python-project-standards`); its pin must equal the tagging pin. New adopters use the [release-please callers](examples/release-please.yml). Removal is planned for a future major version, once those callers have migrated.