Skip to content

ci: scope down release/sync-docs to dedicated GitHub Apps - #168

Merged
MuncleUscles merged 1 commit into
mainfrom
ci/scope-down-release-app-tokens
May 6, 2026
Merged

MuncleUscles merged 1 commit into
mainfrom
ci/scope-down-release-app-tokens

Conversation

@rrabenda

@rrabenda rrabenda commented May 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Reduce the attack surface of release & docs-sync workflows by replacing the shared, over-privileged CI bot with two dedicated, minimally scoped GitHub Apps gated behind protected environments. Mirrors the same change in genlayer-testing-suite#78 and genlayer-cli#297.

  • publish.yml — environment renamed npm → Publish, switched from the archived tibdex/github-app-token@v1 to the official actions/create-github-app-token@v3. Reads vars.PUBLISH_CI_APP_CLIENT_ID and secrets.PUBLISH_CI_APP_KEY.
  • sync-docs.yml — bumped actions/create-github-app-token to @v3, switched to the explicit client-id parameter, gated behind the Sync-docs environment. Reads vars.DOCS_SYNC_APP_CLIENT_ID and secrets.DOCS_SYNC_APP_KEY. Cross-repo repositories: genlayer-docs token request is preserved.

Each App should be installed only on the repos it needs (Publish: this repo only; Sync-docs: this repo + genlayer-docs) with Contents: Read & write as the only permission.

Pre-merge checklist (GitHub side)

  • Publish environment exists with PUBLISH_CI_APP_CLIENT_ID (variable) and PUBLISH_CI_APP_KEY (secret)
  • Move/recreate the existing NPM_TOKEN (or whatever release-it uses for npm publish) from the old npm environment into the new Publish environment, then delete the npm environment
  • Sync-docs environment exists with DOCS_SYNC_APP_CLIENT_ID (variable) and DOCS_SYNC_APP_KEY (secret)
  • Both Apps installed on genlayer-js (sync-docs App also on genlayer-docs) with only Contents: Read & write
  • Publish App added to branch-protection bypass list on main (release-it pushes the version-bump commit + tag)
  • Sync-docs environment "Deployment branches and tags" allows the v* tag pattern (otherwise release: published on a tag ref will be blocked)

Test plan

  • Land a fix: or feat: commit on main and confirm publish.yml mints a token, release-it pushes the version bump + tag, the GitHub Release is created, and the npm upload succeeds
  • Confirm sync-docs.yml fires automatically on release: published and pushes the API-reference update to genlayer-docs
  • Once verified, decommission the old shared CI App from this repo and rotate / revoke its secrets

Replace the over-privileged shared CI bot with two dedicated, minimally
scoped GitHub Apps gated behind protected environments. Mirrors the
same change in genlayer-testing-suite#78 and genlayer-cli#297.

- publish.yml: rename environment npm -> Publish, switch from
  tibdex/github-app-token@v1 (archived) to actions/create-github-app-token@v3
  with vars.PUBLISH_CI_APP_CLIENT_ID + secrets.PUBLISH_CI_APP_KEY.
- sync-docs.yml: bump create-github-app-token to @V3, switch to
  client-id, gate behind the Sync-docs environment with
  vars.DOCS_SYNC_APP_CLIENT_ID + secrets.DOCS_SYNC_APP_KEY.

Each App should be installed only on the repos it needs (Publish: this
repo only; Sync-docs: this repo + genlayer-docs) with Contents: read
& write as the only permission.
@coderabbitai

coderabbitai Bot commented May 6, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@rrabenda has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 54 minutes and 7 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: dc2bff31-ba2d-487b-bdb5-27ee3fd9c96b

📥 Commits

Reviewing files that changed from the base of the PR and between 66a1d03 and 13e980c.

📒 Files selected for processing (2)
  • .github/workflows/publish.yml
  • .github/workflows/sync-docs.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/scope-down-release-app-tokens

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@MuncleUscles
MuncleUscles merged commit ae4805e into main May 6, 2026
4 checks passed
MuncleUscles added a commit that referenced this pull request May 6, 2026
No-op patch release to verify the publish pipeline end-to-end after
the env scope-down (#168) and npm trusted publisher update.
MuncleUscles added a commit that referenced this pull request Jun 8, 2026
* Release v1.1.7 [skip ci]

* ci: scope down release/sync-docs to dedicated GitHub Apps (#168)

Replace the over-privileged shared CI bot with two dedicated, minimally
scoped GitHub Apps gated behind protected environments. Mirrors the
same change in genlayer-testing-suite#78 and genlayer-cli#297.

- publish.yml: rename environment npm -> Publish, switch from
  tibdex/github-app-token@v1 (archived) to actions/create-github-app-token@v3
  with vars.PUBLISH_CI_APP_CLIENT_ID + secrets.PUBLISH_CI_APP_KEY.
- sync-docs.yml: bump create-github-app-token to @V3, switch to
  client-id, gate behind the Sync-docs environment with
  vars.DOCS_SYNC_APP_CLIENT_ID + secrets.DOCS_SYNC_APP_KEY.

Each App should be installed only on the repos it needs (Publish: this
repo only; Sync-docs: this repo + genlayer-docs) with Contents: read
& write as the only permission.

* fix(ci): add trigger comment to publish workflow (#170)

No-op patch release to verify the publish pipeline end-to-end after
the env scope-down (#168) and npm trusted publisher update.

* Release v1.1.8 [skip ci]

* feat: branch-per-major release model (#172)

Aligns this repo with genlayer-node + genvm: branches per major (v1
today; v2 / v2-dev when fees lands), no main, deliberate releases via
script + skill.

What changes:
- publish.yml fires on `push: tags v*` instead of `push: main`. The
  workflow no longer bumps versions — it just sanity-checks that the
  tag matches package.json, builds, publishes to npm, and creates the
  GitHub Release. No commits back to the branch.
- scripts/release.sh is the new release entry point. Pre-flight checks:
  on a v<major> branch, clean tree, in sync with origin, latest CI
  green. Refuses major bumps without --allow-major (those need a new
  branch in this model). Then runs release-it with an explicit
  version to bump package.json, prepend CHANGELOG.md, commit, tag,
  push — but with npm/github plugins disabled so the dev machine
  doesn't need npm auth and the GH release is cut by CI from the tag.
- .claude/skills/release/SKILL.md documents the flow for Claude: when
  to use it, what to confirm with the user, what to refuse, and the
  roll-back path (deprecate, never unpublish blind).
- CONTRIBUTING.md explains the branch model + points at the skill.
- npm run release → ./scripts/release.sh so the convenience script
  routes through pre-flight checks (the previous `release-it --ci`
  invocation bypassed every guard).
- .github/e2e-track on this branch points at runner track v0.5
  (current stable). v2-dev (when it exists) will point at v0.6-dev.

Why kill auto-bump:
- Twice landed accidental majors when a BREAKING CHANGE footer in a
  PR body triggered the conventional-commit bump algorithm — once on
  this repo (0.28.7 → 1.0.0), once on genlayer-testing-suite (yanked
  v1/v2 tags). The whatBump cap mitigated future jumps but didn't
  address the underlying issue: shipping a release shouldn't be a
  side-effect of merging a PR.
- The new flow puts a human checkpoint between "code lands" and
  "users get it" without losing the bump-and-tag automation.

Follow-up (separate PRs):
- After this lands: switch default branch on github.com from main to
  v1, then delete origin/main.
- Same shape applied to genlayer-py, genlayer-cli,
  genlayer-testing-suite, genlayer-explorer (per their existing major).
- Runner matrix updates: matrix/v0.5.yaml tooling refs switch from
  tag pins to branch pins (genlayer-js: v1).

* fix: run CI on v1 branch (#173)

* fix: run CI on v1 branch

* fix: sync testnet consensus abi

* ci(workflows): sync e2e.yml from genlayer-e2e (#174)

Co-authored-by: ci-core-e2e-runner[bot] <263344042+ci-core-e2e-runner[bot]@users.noreply.github.com>

* ci(workflows): sync e2e-housekeeper.yml from genlayer-e2e (#175)

Co-authored-by: ci-core-e2e-runner[bot] <263344042+ci-core-e2e-runner[bot]@users.noreply.github.com>

* ci(workflows): sync e2e.yml from genlayer-e2e (#176)

Co-authored-by: ci-core-e2e-runner[bot] <263344042+ci-core-e2e-runner[bot]@users.noreply.github.com>

* ci(workflows): sync e2e-housekeeper.yml from genlayer-e2e (#177)

Co-authored-by: ci-core-e2e-runner[bot] <263344042+ci-core-e2e-runner[bot]@users.noreply.github.com>

* feat: add v0.6 fee-aware transactions

* fix: handle studio raw transaction hashes

* fix: align studio fee floor fallback

* fix: satisfy fee estimate typecheck

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@genlayer.com>
Co-authored-by: Rafał Rabenda <99408377+rrabenda@users.noreply.github.com>
Co-authored-by: ci-core-e2e-runner[bot] <263344042+ci-core-e2e-runner[bot]@users.noreply.github.com>
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.

2 participants