-
Notifications
You must be signed in to change notification settings - Fork 3
32 lines (29 loc) · 982 Bytes
/
release.yaml
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
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# from: https://docs.github.com/en/actions/guides/building-and-testing-python#publishing-to-package-registries
name: Upload Python Package
on:
create:
jobs:
deploy:
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Upgrade pip and install build and wheel
run: |
python -m pip install --upgrade pip
pip install wheel build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}