-
Notifications
You must be signed in to change notification settings - Fork 4
32 lines (26 loc) · 939 Bytes
/
python-publish.yml
File metadata and controls
32 lines (26 loc) · 939 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
name: Publish
on:
release:
types: [published]
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
container: python:3.7-bullseye
steps:
- uses: actions/checkout@v4
- name: Tooling compatible with Py3.7
run: |
python -m pip install --upgrade "pip<24" # pip 24+ dropped 3.7
python -m pip install "build<1.2" # build>=1.2 dropped 3.7
python -m pip install "setuptools<68" # safe lower bound for 3.7 projects
python -m pip install "wheel<0.42" # newer wheel dropped 3.7
python -m pip install "twine>=4,<5" # 3.7-compatible twine
- name: Build sdist & wheel
run: python -m build
- name: Publish to PyPI with token
run: python -m twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}