-
Notifications
You must be signed in to change notification settings - Fork 12
35 lines (29 loc) 路 888 Bytes
/
Copy pathpublish-pypi.yml
File metadata and controls
35 lines (29 loc) 路 888 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
33
34
35
name: Publish Python distributions to PyPI
on:
release:
types: [published]
jobs:
build-n-publish:
name: Build and publish Python 馃悕 distributions 馃摝 to PyPI and TestPyPI
runs-on: ubuntu-latest
environment: pypi
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v5
with:
ref: master
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install setuptools
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools wheel twine
- name: Build a binary wheel and a source tarball
run: |
python setup.py sdist bdist_wheel
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1