Add publish action
This commit is contained in:
parent
0c4c3d9803
commit
af6eed2714
1 changed files with 9 additions and 5 deletions
14
.github/workflows/publish.yaml
vendored
14
.github/workflows/publish.yaml
vendored
|
|
@ -2,22 +2,25 @@ name: Publish package
|
|||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: Run tests
|
||||
workflows: Check library
|
||||
branches: main
|
||||
types: completed
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
if: |
|
||||
github.event.workflow_run.conclusion == 'success'
|
||||
&& github.event_name == 'push'
|
||||
&& startsWith(github.ref, 'refs/tags')
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python 3.9
|
||||
- name: Set up Python 3.9.2
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.9
|
||||
python-version: 3.9.2
|
||||
|
||||
- name: Install pypa/build
|
||||
run: python -m pip install build --user
|
||||
|
|
@ -28,4 +31,5 @@ jobs:
|
|||
- name: Publish distribution to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@master
|
||||
with:
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||
user: __token__
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue