-
Notifications
You must be signed in to change notification settings - Fork 43
40 lines (33 loc) · 958 Bytes
/
publish.yml
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
permissions:
contents: write
attestations: write
pull-requests: write
on:
release:
types:
- published
jobs:
upload_release:
name: Upload release
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
# Include all history and tags, needed for building the right version
with:
ref: ${{ github.event.release.tag_name }}
fetch-depth: 0
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: "3.11"
cache: "pip"
- name: Install pypa/build
run: python -m pip install build --user
- name: Build a binary wheel and a source tarball
run: python -m build --sdist --wheel --outdir dist/ .
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}