Repository navigation
ci: release with GITHUB_TOKEN, chain WP.org deploy - #5
Merged
Merged
Conversation
The Release workflow pushed with a personal access token (GH_PAT) so that the version tag it created would trigger the WP.org Deploy workflow. That token expired, and because `secrets.GH_PAT || secrets.GITHUB_TOKEN` only falls back when the secret is unset, the release for 1.1.0's follow-up failed with "Invalid username or token". Use the per-run GITHUB_TOKEN instead, which never needs rotating. Since tags pushed with it don't start other workflows, make wporg-deploy.yml a reusable workflow (workflow_call) and run it as a second job of the Release run when semantic-release publishes a version. The deploy checks out the v<version> tag so the shipped files include the version bump commit. Manual workflow_dispatch is kept for re-deploys; the tag-push trigger is removed since it never fires. Claude-Session: https://claude.ai/code/session_01AN9YH8PsKXmdLG8WbZK4mV
|
🎉 This PR is included in version 1.1.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved blocking issues were identified.
Pull request overview
Updates release automation to use GITHUB_TOKEN and chain WordPress.org deployment after successful semantic-release publication.
Changes:
- Replaces expired PAT authentication.
- Converts WP.org deployment into a reusable workflow with manual dispatch support.
- Deploys the released version tag.
File summaries
| File | Description |
|---|---|
.github/workflows/wporg-deploy.yml |
Supports reusable/manual runs and deploys the specified release tag. |
.github/workflows/release.yml |
Publishes releases and invokes deployment with the released version. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Release run for PR #4 (https://github.com/Draggable/kwik-ai/actions/runs/34790674393) failed with
Invalid username or token. TheGH_PATsecret has expired, andsecrets.GH_PAT || secrets.GITHUB_TOKENonly falls back when the secret is unset, not when it is invalid.What
GITHUB_TOKEN, which is minted per run and never expires. No secret to rotate.v*tag would trigger WP.org Deploy. Tags pushed withGITHUB_TOKENnever start workflows, so the deploy is now chained as a second job in the same run (uses: ./.github/workflows/wporg-deploy.yml), gated on semantic-release actually publishing a version.workflow_call) and keepsworkflow_dispatchfor manual re-deploys.versionis now required for both. It checks out thev<version>tag so the deployed files include the version-bump commit. Thepush: tagstrigger is removed since it could never fire.After merging
mainwill publish the pendingfix:commit (e947a04) as 1.1.1 and deploy it to WordPress.org in the same run.GH_PATrepository secret is no longer referenced and can be deleted.https://claude.ai/code/session_01AN9YH8PsKXmdLG8WbZK4mV