Skip to content

ci: release with a deploy key instead of a personal access token - #214

Closed
aldbr wants to merge 1 commit into
DIRACGrid:mainfrom
aldbr:ci/release-deploy-key
Closed

aldbr wants to merge 1 commit into
DIRACGrid:mainfrom
aldbr:ci/release-deploy-key

Conversation

@aldbr

@aldbr aldbr commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Part of DIRACGrid/.github#5.

The release script creates the tag and commits the construct.yaml bump to main through the API with the GH_TOKEN PAT, which the tags and branches rulesets now reject.

  • make_release.py pushes the tag and the bump with git, using a write deploy key (RELEASE_DEPLOY_KEY, environment release, main only). Deploy keys are the bypass actor of both rulesets.
  • Release, assets and artifact downloads use the GITHUB_TOKEN. GH_TOKEN is no longer used.

Tested against a fork with the same rulesets: make_release() and bump_version_in_main() pushed the tag, published the release with its assets and pushed the bump. Not tested: the workflow file and the artifact download with the GITHUB_TOKEN.

The environment, key and ruleset bypass are already in place (scripts/setup_release_key.py, DIRACGrid/.github#13).

🤖 Generated with Claude Code

The rulesets only let deploy keys create tags and push to main, so the
release script now pushes the tag and the construct.yaml bump with git over
SSH, using a write deploy key held in the `release` environment. The GitHub
release and its assets use the GITHUB_TOKEN on the tag that already exists.

Assisted-by: Claude:claude-fable-5-2
@aldbr

aldbr commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Superseded: releases will follow "CI drafts, a release manager publishes, CI ships" with no stored write credential (DIRACGrid/.github#5). The deploy key, its environment and the ruleset bypass have been removed.

@aldbr aldbr closed this Nov 20, 2026
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