blob: 1a12097f92ced7b4cee9a8111e7a8f2de935f3eb [file] [log] [blame]
Yuxuan 'fishy' Wang0ca1ed92024-02-07 17:25:16 -08001name: "PyPI publishing"
2
3on:
4 pull_request:
5 branches: ["*"]
6
7jobs:
8 pypi-publish:
9 name: upload 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: |
Yuxuan 'fishy' Wang0ca1ed92024-02-07 17:25:16 -080026 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 repository-url: https://test.pypi.org/legacy/
33 packages-dir: lib/py/dist/
34