-
Notifications
You must be signed in to change notification settings - Fork 379
36 lines (33 loc) · 1015 Bytes
/
release.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
name: package_release
on: [push]
jobs:
release:
name: Publish to official pypi
runs-on: ${{ matrix.os }}
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
strategy:
matrix:
os:
- ubuntu-latest
python-version: [3.8]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up python dependences
run: |
pip install --upgrade pip
pip install --upgrade flake8 setuptools wheel twine
pip install .
pip install --upgrade build
- name: Build packages
run: |
python -m build --sdist --wheel --outdir dist/
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}