Skip to content

v33.3.2rc2

v33.3.2rc2 #7

Workflow file for this run

name: Publish to PyPI & NPM
on:
release:
types: [published]
jobs:
build:
uses: ./.github/workflows/build.yml # Build the package artifacts
with:
python-version: '3.10'
node-version: 'v18.16.0'
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
permissions:
id-token: write # Mandatory for trusted publishing
contents: read # Required to access repository files
needs: build # Waits for the build job to finish
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download Python distributions
uses: actions/download-artifact@v4
with:
name: python-distributions
path: dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Download npm package
uses: actions/download-artifact@v4
with:
name: npm-package
path: npm-dist/
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Publish to npm
run: |
pushd npm-dist
FILE=$(echo *.tgz)
npm publish "$FILE" --provenance --access public
popd
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
shell: bash