Repository navigation
Conversation
Foundry has no release automation: all PyPI releases so far were uploaded by hand, and the v0.1.8 tag was never published. This adds .github/workflows/release.yaml, triggered by pushing a v* tag: - build: verify the tag matches pyproject.toml's version (.github/release.py verify), then build the sdist and wheel from a clean checkout of the tagged commit. - smoke-test: install the wheel into a fresh venv with no source tree, run pip check, import every package and run each CLI's --help. - publish: upload to PyPI via Trusted Publishing (OIDC, environment `pypi`), so no API token is stored. Runs only on tag pushes. A manual workflow_dispatch run does build + smoke-test without publishing, as a dry run. Before the first tag, a PyPI owner of rc-foundry must register the trusted publisher (RosettaCommons/foundry, release.yaml, environment pypi), and a repo admin should create the `pypi` environment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GitHub substitutes ${{ }} expressions into the script before the shell
runs it, and git tag names can contain shell metacharacters. Use the
GITHUB_REF_TYPE / GITHUB_REF_NAME environment variables the runner
already provides, so the tag is passed to release.py as data.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The publish job holds id-token: write, so every action that runs in this workflow can influence what is uploaded to PyPI as rc-foundry. Pin each action to a full commit SHA, which cannot be moved the way a tag can, with the release it corresponds to in a trailing comment. Pins keep the major versions the repo already uses: actions/checkout v4.4.0 actions/setup-python v5.6.0 actions/upload-artifact v4.6.2 actions/download-artifact v4.3.0 pypa/gh-action-pypi-publish v1.14.3 (peeled commit of annotated tag) Add a github-actions entry to dependabot.yml so the pins get update PRs instead of going stale. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sted creds - smoke-test is now a matrix over base, rfo, rfd3, rfd3na, rf3 and all, each installed from the built wheel into its own fresh venv. Separate venvs catch a dependency missing from one extra that another extra would otherwise mask; `all` catches conflicts between extras (as the rfo `atomworks[ml]==3.0.1` pin in #417 would have caused). Each entry imports the modules that need its extra's dependencies, since --help does not load them. rf3's extra is CUDA kernels, so it is checked for install + pip check only. fail-fast is off so every broken extra shows. - Run build + smoke-test on pull requests touching pyproject.toml or the release tooling, so a broken extra is caught at review time. Publish remains tag-only; superseded PR runs are cancelled. - Set persist-credentials: false on both checkouts: no step needs git auth, and pip / the build backend run third-party code after checkout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a `gate` job that build (and so smoke-test and publish) depends on. On a tag push it fails the release unless: - the tagged commit is an ancestor of origin/production, i.e. it was merged through production's PR process; and - the latest push-triggered run of test.yaml, test_integration.yaml and lint_production.yaml on exactly that commit completed successfully. Workflows are looked up by file name, so renaming jobs does not silently weaken the check. A tag pushed before those runs finish fails with a message to re-run once they complete. On PR and manual runs both checks only emit warnings, since those commits are not on production. The job gets actions: read; the token is passed to the one step that queries the API and is not persisted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The RosettaCommons org is on a legacy GitHub plan on which deployment environments cannot be configured (the settings page and environments API return 404 even for org owners). Referencing `environment: pypi` would auto-create an environment with no protection rules, so it added nothing. Trusted Publishing does not require an environment; the PyPI trusted publisher is registered with the environment field left blank. Release control comes from the gate job, production branch protection, and a tag ruleset restricting who may create v* tags. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Trusted Publishing from this repo is not safe on the org's legacy GitHub plan: deployment environments cannot be configured, so a publisher with a blank environment matches only repository + workflow filename, and anyone with write access could publish by pushing a branch with an edited copy of release.yaml. The tag ruleset, gate job and branch protection guard only the official tag route. Remove the publish job and its id-token permission. The workflow still gates, builds and smoke-tests on tag pushes, manual runs and packaging PRs, and saves the sdist and wheel as the `dist` artifact; uploading is a manual twine step using that artifact until the team decides how to automate publishing safely. This corrects the trust-model claims in the previous commit's header comment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Smoke tests now consume an internal `untested-build` artifact. A final `release-files` job, which runs only after the gate, build and all smoke tests pass, runs `twine check --strict`, records the files' SHA-256 hashes in the run summary and uploads them. - The uploaded artifact is named `dist` only on runs for a v* tag; PR and branch runs produce `dist-dryrun`, so dry-run files carrying the release file names can't be mistaken for release files. - Rewrite the header comment to describe the manual upload process without detailing publishing internals, and correct comments that described manual runs as never having a tag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Adds a workflow that builds and checks
rc-foundryrelease files from a tagged commit. It deliberately does not upload to PyPI; that stays a manual step for now.How it works
Pushing a
v*tag runs:productionandtest,test_integrationandlint_productionmust have passed on that commit.v<pyproject version>(.github/release.py verify). Builds the sdist and wheel from a clean checkout.base,rfo,rfd3,rfd3na,rf3,all) into its own fresh venv;pip check, imports, CLI--help.twine check --strict, writes the files' SHA-256 hashes to the run summary, and saves them as the run'sdistartifact.PRs touching
pyproject.toml,release.yamlorrelease.py, and manual runs (workflow_dispatch) on a branch, do the same build and checks as a dry run: the gate only warns, and the files are saved asdist-dryrun, neverdist. A manual run on av*tag behaves like the tag push. Actions in this workflow are SHA-pinned; the new Dependabotgithub-actionsentry covers all workflows, so expect version-bump PRs for the others too. Checkouts don't persist credentials.Releasing with this
production.vX.Y.Zon that commit. A tag ruleset limits creating, moving and deletingv*tags to admins.distartifact and runtwine uploadwith a PyPI token scoped torc-foundry.