ci sdk auth

This commit is contained in:
phact 2026-01-05 15:19:50 -05:00
parent 99c8face00
commit 58107b5e9c
2 changed files with 9 additions and 9 deletions

View file

@ -25,8 +25,8 @@ jobs:
with:
python-version: '3.12'
- name: Install build tools
run: pip install build twine
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Extract version from pyproject.toml
id: version
@ -46,14 +46,13 @@ jobs:
- name: Build package
if: steps.check.outputs.exists == 'false'
run: python -m build
run: uv build
- name: Publish to PyPI
if: steps.check.outputs.exists == 'false'
run: twine upload dist/*
run: uv publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
UV_PUBLISH_TOKEN: ${{ secrets.UV_PUBLISH_TOKEN }}
- name: Skip publish (version exists)
if: steps.check.outputs.exists == 'true'

View file

@ -12,6 +12,9 @@ jobs:
publish:
name: Publish to npm
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
defaults:
run:
working-directory: sdks/typescript
@ -51,9 +54,7 @@ jobs:
- name: Publish to npm
if: steps.check.outputs.exists == 'false'
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --access public --provenance
- name: Skip publish (version exists)
if: steps.check.outputs.exists == 'true'