Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 35 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,52 @@ name: Release
on:
release:
types: [published]
workflow_dispatch:

jobs:
PyPI:
pypi-build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.x"
- run: python -m pip install --upgrade pip build wheel twine
- name: Build dist packages
run: python -m build --sdist --wheel
- run: python -m twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
- run: python -m pip install --upgrade pip build wheel
- run: python -m build --sdist --wheel
- uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/

npm:
pypi-publish:
runs-on: ubuntu-latest
needs:
- release-build
permissions:
id-token: write

steps:
- uses: actions/download-artifact@v5
with:
name: release-dists
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1

npmjs:
name: npmjs.org
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
- uses: actions/setup-python@v6
with:
python-version: "3.x"
- run: python -m pip install --upgrade setuptools_scm
- run: python set_version.py
- name: Upload packages
run: npm publish
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
node-version-file: .nvmrc
registry-url: 'https://registry.npmjs.org'
- run: npm install -g npm@latest
- run: npm ci
- run: npm config set git-tag-version=false
- run: npm version ${{ github.event.release.tag_name }}
- run: npm run build --if-present
- run: npm publish
13 changes: 0 additions & 13 deletions set_version.py

This file was deleted.