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