Skip to content

Mint GitHub App token in push workflow - #26

Merged
MaxGhenis merged 1 commit into
masterfrom
migrate-to-app-token
Apr 17, 2026
Merged

MaxGhenis merged 1 commit into
masterfrom
migrate-to-app-token

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

Summary

  • Replace expired POLICYENGINE_GITHUB PAT with a short-lived GitHub App token minted via actions/create-github-app-token@v1 in the versioning and Deploy jobs
  • Pass the App token to EndBug/add-and-commit@v9 via github_token: and add fetch: false
  • Drop the stale job-level env.GH_TOKEN in Deploy; update_api.py reads GITHUB_TOKEN from its step env

Follows the same pattern already landed in policyengine-core #470, microdf #296, policyengine-canada, policyengine-us.

Test plan

  • CI lint/test pass on this PR
  • After merge, the next Update PolicyEngine Nigeria push shows versioning and Deploy jobs minting a token and succeeding

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

Replace the expired POLICYENGINE_GITHUB org PAT with a short-lived
GitHub App token minted via actions/create-github-app-token in the
versioning and Deploy jobs, and pass the App token to
EndBug/add-and-commit via github_token with fetch: false. Matches the
pattern already used in policyengine-core, microdf,
policyengine-canada, and policyengine-us.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@MaxGhenis
MaxGhenis force-pushed the migrate-to-app-token branch from caebc4d to b3c4d75 Compare April 17, 2026 23:33
@MaxGhenis
MaxGhenis merged commit 251e4c4 into master Apr 17, 2026
10 checks passed
@MaxGhenis
MaxGhenis deleted the migrate-to-app-token branch April 17, 2026 23:36
@anth-volk anth-volk mentioned this pull request Oct 12, 2026
2 of 5 tasks
anth-volk added a commit that referenced this pull request Oct 12, 2026
* Publish to PyPI with trusted publishing

Add environment: pypi and id-token: write to the job that runs
pypa/gh-action-pypi-publish, and drop the user/password inputs that
passed the org-wide secrets.PYPI token, so the upload uses OIDC.

Add a changed fragment so merging cuts a patch release. Move the
fragment under changelog.d/changed/ to changelog.d/<name>.changed.md:
bump_version.py only reads files at the top of changelog.d, so it
exited with "No changelog fragments found" and has failed the
Update versioning job on every push since #26.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Release above the stray 0.6.0 on PyPI

PyPI already has policyengine-ng 0.6.0 (uploaded 2026-02-24), above
this repo's version line, so a patch release from the old version
would sort below it and pip would keep installing 0.6.0. Start from
0.6.0 so this release is 0.6.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Anthony Volk <14987227+anth-volk@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.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.

1 participant