blob: ad089f0e6dc7a24e14722c226151ec16ab5e8954 [file] [log] [blame]
Yuxuan 'fishy' Wang84b35ff2024-02-07 17:42:39 -08001name: "PyPI publishing"
2
3on:
4 release:
5 types: [published]
6
7jobs:
8 pypi-publish:
9 name: Publish release to PyPI
10 runs-on: ubuntu-latest
11 # Specifying a GitHub environment is optional, but strongly encouraged
12 environment: release
13 permissions:
14 # IMPORTANT: this permission is mandatory for trusted publishing
15 id-token: write
16 steps:
17 - uses: actions/checkout@v4
18
19 - name: Set up Python
20 uses: actions/setup-python@v5
21 with:
22 python-version: "3.8"
23
24 - name: Build
25 run: |
26 cd lib/py
27 python setup.py sdist
28
29 - name: Publish package distributions to PyPI
30 uses: pypa/gh-action-pypi-publish@release/v1
31 with:
32 packages-dir: lib/py/dist/