Skip to content

ci: push the release commit and tags with a deploy key - #14

Merged
Mearman merged 2 commits into
mainfrom
ci/release-deploy-key
Oct 10, 2026
Merged

Mearman merged 2 commits into
mainfrom
ci/release-deploy-key

Conversation

@Mearman

@Mearman Mearman commented Oct 10, 2026

Copy link
Copy Markdown
Member

The release job now pushes its release commit and tags to the protected main with the repository deploy key over SSH, as json-compose does, instead of with GITHUB_TOKEN.

The orchestrator pushes with git push --atomic origin HEAD:<branch> <tags> (semantic-release-workspace src/git.ts, pushHeadAndTags) and has no repositoryUrl option, so the key is wired in at the step: checkout no longer persists a credential, the key is written to $RUNNER_TEMP from step env in the step before Release, and the Release step sets GIT_SSH_COMMAND plus a per-process url.git@github.com:.insteadOf rewrite so origin resolves to SSH. GITHUB_TOKEN stays in that step for @semantic-release/github, which only calls the API. The key is removed in an always() step.

README and CONTRIBUTING state the mechanism. The first real push happens on the next release run; the main ruleset must list the deploy key as a bypass actor before then.

GITHUB_TOKEN cannot bypass the main ruleset, so the release job now pushes with the repository
deploy key over SSH. Checkout no longer persists a credential, the key is written to the runner's
temporary directory in the step before the release and removed afterwards, and the release step
rewrites https GitHub URLs to SSH through git's per-process config so the orchestrator's plain
`git push origin` authenticates with the key. GITHUB_TOKEN stays in that step for the GitHub API.
State that the release commit and tags reach the protected main through a deploy key listed as a
bypass actor on the ruleset, and what GITHUB_TOKEN is still used for.
@Mearman
Mearman marked this pull request as ready for review October 10, 2026 11:27
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-10-10T11:30:51.762393Z 03e37f5 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Mearman
Mearman merged commit 8db94ff into main Oct 10, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant