ci: adopt shared reusable release-tag workflow - #647
Merged
Merged
Conversation
Author
|
CI triage:
|
porcellus
marked this pull request as ready for review
July 21, 2026 15:09
porcellus
approved these changes
Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
.github/workflows/pipeline-release-tag.ymlwas a per-repo copy of the releasepipeline. PLAN-001 consolidated the three SDK copies (node/python/golang) into a
single
workflow_callworkflow insupertokens/actions(
.github/workflows/release-tag.yml@main, added in supertokens/actions#13,PLAN-001 C2). This unit ports supertokens-python onto that shared workflow so the
release skeleton stops drifting across repos.
Fix
Replace the file with a thin caller of the shared reusable workflow,
parameterized
sdk_name: pythonwithsecrets: inherit. The shared five-jobskeleton (
setup→register-version→mark-as-success→release→merge, including the post-release dev sync) now lives once in the reusableworkflow.
The two python ecosystem follow-ups stay in the caller and are rewired to
consume the reusable workflow's outputs via
needs.release-pipeline.outputs.*:publish-docs— usesreleaseTag,isLatest,version, and the derivedversion folder
${{ needs.release-pipeline.outputs.versionXy }}.X. Thereusable workflow exposes
version/versionXyrather than python's oldversionFolder/artifactName, so those are derived inline(
python-docs-<version>,<versionXy>.X). Its app-token still requests boththis repo and
supertokens-backend-website.publish(PyPI/twine) — checks outreleaseTag, keeps itsenvironment: publishgate; unchanged otherwise.changelog_add_pathsis set to.changes/ CHANGELOG.md setup.py supertokens_python/constants.pyso the reusable workflow's release changelogcommit stages every
.changie.yamlreplacement target (the default.changes/ CHANGELOG.mdwould miss python's two version files).Version-hook contract: the reusable
setupjob sourceshooks/populate-hook-constants.shand readsconstantsVersion/constantsVersionXy— which python already exported, so no shim was needed forthe contract itself. The one relocation: the previous copy's inline "Constants
version and setup version mismatch" guard (which the reusable
setupdoes notcarry) moved into
populate-hook-constants.sh, per the shared contract's notethat repo-specific setup checks belong in the hook and exit non-zero. That same
invariant is still independently enforced by
hooks/check-version.sh(pre-commit) and
.github/workflows/check-docs.yml(on version-branch push).Behaviour vs. the previous flow
Identical except for differences inherited from the shared workflow:
release: truePATCH (the tag is the release; the API mark follows reality).supertokens-python <version>(repo name) instead ofPython SDK <version>.mark-as-successrelies oncheck-tests-passed'ssetup-python: trueinstead of the old explicitsetup-python+pip install httpxstep —same effect.
register-versionand the post-release dev sync were already present inpython's copy (python was a baseline for the shared workflow), so they are
unchanged in behaviour — only their home moved.
Tests added / run
None. There is no unit-testable surface here — these are release-time GitHub
Actions paths.
bash -n hooks/populate-hook-constants.sh— OK.constantsVersion/constantsVersionXyand the mismatch guard passes (constants.py and setup.py both
0.31.3).pre-commit runover the changed files:check-version,check-branch,trim trailing whitespace,fix end of files,don't commit to branchallPassed;
ruff/ruff-format/check python astskipped (no.pychanged).Not verified
only when a
release/vX.Y.ZPR merges into a version branch, or on manualworkflow_dispatch. First real validation is the next python release — treatit as supervised.
(
RELEASE_APP_IDvar,RELEASE_APP_PRIVATE_KEY,SUPERTOKENS_API_KEY,SUPERTOKENS_RELEASE_API_KEY, plus the caller'sTWINE_USERNAME/TWINE_PASSWORD). The C0 unit (ci: mint App installation tokens in release workflows (retire ALL_REPO_PAT) #646) already wiredRELEASE_APP_ID/RELEASE_APP_PRIVATE_KEYinto the old pipeline, so thoseshould be in place; the reviewer should confirm the twine creds.
releasejob documentswhy: a pushed tag is immutable server-side and cached forever on the package
index; the fix for a mid-release failure is a new patch version, never a
retag).
Cross-SDK note
supertokens-node is the reference implementation and adopted the same shared
workflow in supertokens/supertokens-node#1058 (PLAN-001 C3); golang's adoption is
its own PLAN-001 unit. The reusable workflow was ported from golang (the cleanest
copy) and parameterized by
sdk_name; python already emittedconstantsVersion/constantsVersionXyand already hadregister-version+ thepost-release dev sync, so python's diff here is essentially caller-ification plus
the tag-before-API-mark ordering change and the mismatch-check relocation.
Reviewer note (PLAN-001)
PLAN-001 flags C-phase release-tag adoptions as high-risk / supervised — not
fast-merge. Opened as draft for that reason: the mechanical change is here,
but a human should confirm the secret/var wiring and sign off before the next
release exercises it.
Part of PLAN-001
Fixes #645