Skip to content

ci: release with GITHUB_TOKEN, chain WP.org deploy - #5

Merged
kevinchappell merged 1 commit into
mainfrom
ci/release-without-pat
Sep 13, 2026
Merged

kevinchappell merged 1 commit into
mainfrom
ci/release-without-pat

Conversation

@kevinchappell

Copy link
Copy Markdown
Collaborator

Why

The Release run for PR #4 (https://github.com/Draggable/kwik-ai/actions/runs/34790674393) failed with Invalid username or token. The GH_PAT secret has expired, and secrets.GH_PAT || secrets.GITHUB_TOKEN only falls back when the secret is unset, not when it is invalid.

What

  • release.yml pushes with the built-in GITHUB_TOKEN, which is minted per run and never expires. No secret to rotate.
  • The PAT only existed so the pushed v* tag would trigger WP.org Deploy. Tags pushed with GITHUB_TOKEN never 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.
  • wporg-deploy.yml becomes a reusable workflow (workflow_call) and keeps workflow_dispatch for manual re-deploys. version is now required for both. It checks out the v<version> tag so the deployed files include the version-bump commit. The push: tags trigger is removed since it could never fire.

After merging

  • Merging this to main will publish the pending fix: commit (e947a04) as 1.1.1 and deploy it to WordPress.org in the same run.
  • The GH_PAT repository secret is no longer referenced and can be deleted.

https://claude.ai/code/session_01AN9YH8PsKXmdLG8WbZK4mV

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
Copilot AI lite review requested due to automatic review settings September 13, 2026 23:52
@kevinchappell
kevinchappell merged commit 6783a38 into main Sep 13, 2026
2 checks passed
@kevinchappell
kevinchappell deleted the ci/release-without-pat branch September 13, 2026 23:54
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.1.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants