-
Notifications
You must be signed in to change notification settings - Fork 65
33 lines (33 loc) · 930 Bytes
/
publish.yml
File metadata and controls
33 lines (33 loc) · 930 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Publish to Pypi
on:
workflow_dispatch:
release:
types: [published]
jobs:
build-n-publish:
name: Build and publish distributions to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0 # deep clone for setuptools-scm
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install pypa/build
run: |
python3 -m pip install --upgrade pip
pip3 install setuptools setuptools_scm cmake wheel scikit-build ninja
- name: Build distributions
run: |
cd python
cp -r ../src .
python3 setup.py bdist_wheel
python3 setup.py sdist
cd ..
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
packages-dir: python/dist/