-
Notifications
You must be signed in to change notification settings - Fork 25
40 lines (37 loc) · 1.2 KB
/
python-pub.yml
File metadata and controls
40 lines (37 loc) · 1.2 KB
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
33
34
35
36
37
38
39
40
name: Publish Python 🐍 distributions 📦 to PyPI
on:
release:
types: [ published ]
permissions:
contents: read
jobs:
release-build:
runs-on: ubuntu-latest
strategy:
matrix:
python: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ]
steps:
- uses: actions/checkout@master
- name: Setup Python3.7
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install pypa/build
run: >-
python -m
pip install
build
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}