Skip to content

Commit 3263fba

Browse files
authored
Create publish.yml
1 parent 7cfa52c commit 3263fba

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Python Publish Workflow
2+
on:
3+
workflow_dispatch:
4+
5+
jobs:
6+
publish:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
11+
- if: ${{ github.event_name == 'release' }}
12+
name: Publish Release to PyPi
13+
uses: dciborow/pyaction@0.0.28
14+
with:
15+
pypi_publish: true
16+
pypi_password: ${{ secrets.PYPI_PASSWORD }}
17+
18+
- if: ${{ github.event_name == 'push' }}
19+
name: Publish RC to PyPi
20+
uses: dciborow/pyaction@0.0.28
21+
with:
22+
pypi_publish: true
23+
pypi_password: ${{ secrets.PYPI_PASSWORD }}
24+
version_suffix: -rc${{ github.run_number }}-post${{ github.run_attempt }}
25+
26+
- if: ${{ github.event_name == 'pull_request' }}
27+
name: Publish Snapshot to TestPyPi
28+
uses: dciborow/pyaction@0.0.28
29+
with:
30+
pypi_publish: true
31+
pypi_password: ${{ secrets.TEST_PYPI_PASSWORD }}
32+
pypi_repo: testpypi
33+
version_suffix: -post${{ github.run_number }}-dev${{ github.run_attempt }}

0 commit comments

Comments
 (0)