-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 893 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
41
name: Publish
on:
push:
branches:
- main
tags:
- "[0-9]+.[0-9]+.*"
jobs:
pypi:
name: PyPI
environment: Release
if: github.ref_type == 'tag'
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3.6.0
- name: Set up Python 3.10
uses: actions/setup-python@v4.8.0
with:
python-version: "3.10"
cache: pip
cache-dependency-path: setup.py
- name: Install dependencies
run: python -m pip install -U pip build
- name: Simplify README.md for packaging
run: python .github/scripts/simplify-readme.py
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@v1.12.2
with:
password: ${{ secrets.PYPI_API_TOKEN }}
print_hash: true