| 1 |
on: |
| 2 |
push: |
| 3 |
tags: |
| 4 |
- v* |
| 5 |
|
| 6 |
permissions: {} |
| 7 |
|
| 8 |
# a lot of code taken from https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml |
| 9 |
jobs: |
| 10 |
build: |
| 11 |
runs-on: ubuntu-latest |
| 12 |
|
| 13 |
steps: |
| 14 |
- uses: actions/checkout@v7 |
| 15 |
with: |
| 16 |
persist-credentials: false |
| 17 |
- uses: actions/setup-python@v6 |
| 18 |
with: |
| 19 |
python-version: "3.10" |
| 20 |
- run: python -m pip install build |
| 21 |
- run: python -m build |
| 22 |
|
| 23 |
- uses: actions/upload-artifact@v7 |
| 24 |
with: |
| 25 |
name: trio-dist |
| 26 |
path: | |
| 27 |
dist/*.tar.gz |
| 28 |
dist/*.whl |
| 29 |
|
| 30 |
pypi-publish: |
| 31 |
needs: [build] |
| 32 |
name: upload release to PyPI |
| 33 |
runs-on: ubuntu-latest |
| 34 |
environment: |
| 35 |
name: release |
| 36 |
url: https://pypi.org/project/trio |
| 37 |
permissions: |
| 38 |
id-token: write |
| 39 |
|
| 40 |
steps: |
| 41 |
- uses: actions/download-artifact@v8 |
| 42 |
with: |
| 43 |
pattern: trio-* |
| 44 |
path: dist |
| 45 |
merge-multiple: true |
| 46 |
|
| 47 |
- name: Publish package distributions to PyPI |
| 48 |
uses: pypa/gh-action-pypi-publish@release/v1 |