blob: 2d594756a370f88e24d2423cea5c8b88083d8c06 [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' Wang9791a3f2024-02-08 10:58:15 -080026 python -m pip install --upgrade pip
27 python -m pip install setuptools
Yuxuan 'fishy' Wang0ca1ed92024-02-07 17:25:16 -080028 cd lib/py
29 python setup.py sdist
30
31 - name: Publish package distributions to PyPI
32 uses: pypa/gh-action-pypi-publish@release/v1
33 with:
34 repository-url: https://test.pypi.org/legacy/
35 packages-dir: lib/py/dist/
36