ci sdk auth
This commit is contained in:
parent
99c8face00
commit
58107b5e9c
2 changed files with 9 additions and 9 deletions
11
.github/workflows/publish-sdk-python.yml
vendored
11
.github/workflows/publish-sdk-python.yml
vendored
|
|
@ -25,8 +25,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
python-version: '3.12'
|
python-version: '3.12'
|
||||||
|
|
||||||
- name: Install build tools
|
- name: Install uv
|
||||||
run: pip install build twine
|
uses: astral-sh/setup-uv@v4
|
||||||
|
|
||||||
- name: Extract version from pyproject.toml
|
- name: Extract version from pyproject.toml
|
||||||
id: version
|
id: version
|
||||||
|
|
@ -46,14 +46,13 @@ jobs:
|
||||||
|
|
||||||
- name: Build package
|
- name: Build package
|
||||||
if: steps.check.outputs.exists == 'false'
|
if: steps.check.outputs.exists == 'false'
|
||||||
run: python -m build
|
run: uv build
|
||||||
|
|
||||||
- name: Publish to PyPI
|
- name: Publish to PyPI
|
||||||
if: steps.check.outputs.exists == 'false'
|
if: steps.check.outputs.exists == 'false'
|
||||||
run: twine upload dist/*
|
run: uv publish
|
||||||
env:
|
env:
|
||||||
TWINE_USERNAME: __token__
|
UV_PUBLISH_TOKEN: ${{ secrets.UV_PUBLISH_TOKEN }}
|
||||||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
|
||||||
|
|
||||||
- name: Skip publish (version exists)
|
- name: Skip publish (version exists)
|
||||||
if: steps.check.outputs.exists == 'true'
|
if: steps.check.outputs.exists == 'true'
|
||||||
|
|
|
||||||
7
.github/workflows/publish-sdk-typescript.yml
vendored
7
.github/workflows/publish-sdk-typescript.yml
vendored
|
|
@ -12,6 +12,9 @@ jobs:
|
||||||
publish:
|
publish:
|
||||||
name: Publish to npm
|
name: Publish to npm
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
id-token: write
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: sdks/typescript
|
working-directory: sdks/typescript
|
||||||
|
|
@ -51,9 +54,7 @@ jobs:
|
||||||
|
|
||||||
- name: Publish to npm
|
- name: Publish to npm
|
||||||
if: steps.check.outputs.exists == 'false'
|
if: steps.check.outputs.exists == 'false'
|
||||||
run: npm publish --access public
|
run: npm publish --access public --provenance
|
||||||
env:
|
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
||||||
|
|
||||||
- name: Skip publish (version exists)
|
- name: Skip publish (version exists)
|
||||||
if: steps.check.outputs.exists == 'true'
|
if: steps.check.outputs.exists == 'true'
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue