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

Commit 6b9aead

Browse files
authored
Create publish_workflow.yml
1 parent 683fb22 commit 6b9aead

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Python
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
release:
8+
types: [created]
9+
workflow_call:
10+
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- if: ${{ github.event_name == 'release' }}
18+
name: Publish Release to PyPi
19+
uses: dciborow/pyaction@0.0.30
20+
with:
21+
pypi_publish: true
22+
pypi_password: ${{ secrets.PYPI_PASSWORD }}
23+
24+
- if: ${{ github.event_name == 'push' }}
25+
name: Publish RC to PyPi
26+
uses: dciborow/pyaction@0.0.30
27+
with:
28+
pypi_publish: true
29+
pypi_password: ${{ secrets.PYPI_PASSWORD }}
30+
version_suffix: -rc${{ github.run_number }}-post${{ github.run_attempt }}
31+
32+
- if: ${{ github.event_name == 'pull_request' }}
33+
name: Publish Snapshot to TestPyPi
34+
uses: dciborow/pyaction@0.0.30
35+
with:
36+
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 }}

0 commit comments

Comments
 (0)