Buckets:
| name: Release | |
| # Publishes a tagged release to PyPI over Trusted Publishing (OIDC) -- no | |
| # API token or repository secret is stored anywhere. This workflow is INERT | |
| # until the operator completes two one-time setup steps outside this repo: | |
| # | |
| # 1. On https://pypi.org, add a *pending* trusted publisher before the | |
| # project exists (account menu -> Publishing -> "Add a new pending | |
| # publisher"): PyPI project name "coordharness", GitHub repository | |
| # "0marm0/COORD-Harness", workflow filename "release.yml", environment | |
| # name "pypi". If the project already exists, add the trusted | |
| # publisher under that project's own "Publishing" settings instead of | |
| # the pending-publisher flow. | |
| # 2. In this repository's Settings -> Environments, create an environment | |
| # named "pypi" (required reviewers or other protection rules are | |
| # optional) so the `environment: pypi` binding below has something to | |
| # resolve to. | |
| # | |
| # Until both steps are done, PyPI has no trusted-publisher record for this | |
| # repo/workflow/environment, so the publish job's OIDC token exchange fails | |
| # closed -- pushing a `v*` tag before that is safe and will not publish | |
| # anything. | |
| # | |
| # candidate-manifest.json is deliberately NOT produced by this workflow. | |
| # Per docs/releasing.md, it is generated by tools/publication_gate.py | |
| # against a maintainer-only forbidden-vocabulary file that must never enter | |
| # this repository or a CI runner. Generate it locally and attach it to the | |
| # release by hand once the tag's release exists, e.g.: | |
| # | |
| # gh release upload <tag> /absolute/private/path/to/release-evidence/candidate-manifest.json | |
| # | |
| # The wheel and sdist below are attached automatically; the manifest is the | |
| # one asset that stays a manual, maintainer-only step by design. | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Build wheel and sdist | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Same checkout/setup-python/build steps as the "packaging" job in | |
| # python.yml, which already proves both formats clean-install. | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| - name: Build both distribution formats | |
| run: | | |
| python -m pip install --upgrade pip build 'setuptools>=83' pytest | |
| python -m build --wheel --sdist | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: dist | |
| path: dist/ | |
| publish: | |
| name: Publish to PyPI (trusted publishing) | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: dist | |
| path: dist/ | |
| # Pinned to a commit, not to release/v1: this is the only job that holds | |
| # id-token: write, so a moving ref here would let whoever can move it run | |
| # code with the PyPI OIDC token for this project on the next v* tag. | |
| - uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2 | |
| attach-release-assets: | |
| name: Attach wheel/sdist to the GitHub release | |
| needs: publish | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: dist | |
| path: dist/ | |
| - name: Create the GitHub release and attach the built artifacts | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: gh release create "$GITHUB_REF_NAME" dist/* --title "$GITHUB_REF_NAME" --generate-notes | |
Xet Storage Details
- Size:
- 3.89 kB
- Xet hash:
- 4ee533f8c0034f97ada7f03d3140eaf483be8afe2cae8b123b7decf44d58438c
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.