Merge pull request #15 from EverMind-AI/sdk/v1.0.0 #8
Workflow file for this run
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
| # Publish to PyPI on a version tag, via OIDC trusted publishing (no stored token). | |
| # | |
| # The SDK factory pushes generated source + an annotated `vX.Y.Z` tag to this repo; | |
| # that tag triggers this workflow. PyPI must have a Trusted Publisher configured for | |
| # project `everos-cloud` pointing at this repo + workflow (`publish.yml`). | |
| # | |
| # NOTE: `everos-cloud` predates this factory — it was published from | |
| # github.com/evermemos/everos-cloud-python up to 0.4.1. Publishing from here needs a | |
| # Trusted Publisher for THIS repo added to that existing PyPI project; the 0.4.x | |
| # publisher does not carry over. | |
| name: publish | |
| on: | |
| push: | |
| tags: ["v*.*.*"] | |
| permissions: | |
| contents: read | |
| jobs: | |
| pypi: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # required for OIDC → PyPI trusted publishing | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Guard — tag matches package version | |
| run: | | |
| TAG="${GITHUB_REF_NAME#v}" | |
| PKG="$(grep -m1 -E '^version *= *' pyproject.toml | sed -E 's/.*"([^"]+)".*/\1/')" | |
| echo "tag=$TAG pyproject=$PKG" | |
| test "$TAG" = "$PKG" || { echo "::error::tag $TAG != pyproject version $PKG"; exit 1; } | |
| - name: Build sdist + wheel | |
| run: | | |
| python -m pip install --upgrade build | |
| python -m build | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |