Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Commit d9caa79

Browse files
authored
Update publish_workflow.yml
1 parent 6b9aead commit d9caa79

1 file changed

Lines changed: 15 additions & 16 deletions

File tree

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,38 @@
11
name: Python
22
on:
3-
push:
4-
branches: [ main ]
5-
pull_request:
6-
branches: [ main ]
7-
release:
8-
types: [created]
93
workflow_call:
4+
secrets:
5+
PYPI_PASSWORD:
6+
required: false
7+
TEST_PYPI_PASSWORD:
8+
required: false
109

1110
jobs:
1211
publish:
1312
runs-on: ubuntu-latest
1413
steps:
1514
- uses: actions/checkout@v2
1615

17-
- if: ${{ github.event_name == 'release' }}
18-
name: Publish Release to PyPi
16+
- name: Publish Snapshot to TestPyPi
1917
uses: dciborow/pyaction@0.0.30
18+
if: ${{ github.event_name == 'pull_request' }}
2019
with:
2120
pypi_publish: true
22-
pypi_password: ${{ secrets.PYPI_PASSWORD }}
21+
pypi_password: ${{ secrets.TEST_PYPI_PASSWORD }}
22+
pypi_repo: testpypi
23+
version_suffix: -post${{ github.run_number }}-dev${{ github.run_attempt }}
2324

24-
- if: ${{ github.event_name == 'push' }}
25-
name: Publish RC to PyPi
25+
- name: Publish RC to PyPi
2626
uses: dciborow/pyaction@0.0.30
27+
if: ${{ github.event_name == 'push' }}
2728
with:
2829
pypi_publish: true
2930
pypi_password: ${{ secrets.PYPI_PASSWORD }}
3031
version_suffix: -rc${{ github.run_number }}-post${{ github.run_attempt }}
3132

32-
- if: ${{ github.event_name == 'pull_request' }}
33-
name: Publish Snapshot to TestPyPi
33+
- name: Publish Release to PyPi
3434
uses: dciborow/pyaction@0.0.30
35+
if: ${{ github.event_name == 'release' }}
3536
with:
3637
pypi_publish: true
37-
pypi_password: ${{ secrets.TEST_PYPI_PASSWORD }}
38-
pypi_repo: testpypi
39-
version_suffix: -post${{ github.run_number }}-dev${{ github.run_attempt }}
38+
pypi_password: ${{ secrets.PYPI_PASSWORD }}

0 commit comments

Comments
 (0)