Publish to PyPI with GitHub Actions
This commit is contained in:
28
.github/workflows/pypi.yml
vendored
Normal file
28
.github/workflows/pypi.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
name: pypi-publish
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
tags:
|
||||
- 'v*'
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.6
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install -e .
|
||||
- name: Build package
|
||||
run: |
|
||||
pip install --upgrade build
|
||||
python -m build
|
||||
- name: Publish package
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||
Reference in New Issue
Block a user