Repository navigation
chore: release 1.0.0 #1
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
| name: Release | |
| on: | |
| push: | |
| tags: ["v*"] | |
| jobs: | |
| publish: | |
| name: Publish to PyPI | |
| runs-on: ubuntu-latest | |
| environment: pypi | |
| permissions: | |
| contents: read | |
| id-token: write # PyPI trusted publishing: no API token is stored anywhere. | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: astral-sh/setup-uv@v6 | |
| - name: The tag names the package version | |
| run: | | |
| version=$(sed -n 's/^__version__ = "\(.*\)"$/\1/p' src/kaitencloud/_version.py) | |
| if [ "v$version" != "$GITHUB_REF_NAME" ]; then | |
| echo "tag $GITHUB_REF_NAME does not match the package version $version" >&2 | |
| exit 1 | |
| fi | |
| - run: uv sync --locked | |
| - run: uv run pytest | |
| - run: uv build | |
| - run: uvx twine check --strict dist/* | |
| - run: uv publish --trusted-publishing always |