Add publish workflow
This commit is contained in:
parent
b1398189a0
commit
04f7ea78d3
28
.github/workflows/publish.yml
vendored
Normal file
28
.github/workflows/publish.yml
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
name: Publish
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.10'
|
||||
- name: Install
|
||||
run: python -m pip install setuptools wheel twine
|
||||
- name: Build
|
||||
run: |
|
||||
python setup.py check
|
||||
python setup.py sdist bdist_wheel
|
||||
python -m twine check dist/*
|
||||
- name: Publish
|
||||
run: python -m twine upload dist/*
|
||||
env:
|
||||
TWINE_USERNAME: __token__
|
||||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
Loading…
Reference in a new issue