diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..b7d149ae --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,40 @@ +--- +name: Publish on PyPI + +"on": + push: + tags: + - "v*" + workflow_dispatch: + +permissions: + contents: read + id-token: write + +jobs: + publish: + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/project/ai/ + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + fetch-depth: 0 + persist-credentials: false + + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + with: + python-version: "3.14" + + - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 + with: + enable-cache: false + + - run: uv venv --python 3.14 + + - name: Build distributions + run: uv build + + - name: Publish to PyPI + run: uv publish --trusted-publishing always