-
Notifications
You must be signed in to change notification settings - Fork 19
39 lines (35 loc) · 1.09 KB
/
pypi.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Python CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
release:
types: [created]
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- if: ${{ github.event_name == 'release' }}
name: Publish Release to PyPi
uses: dciborow/pyaction@0.0.28
with:
pypi_publish: true
pypi_password: ${{ secrets.PYPI_PASSWORD }}
- if: ${{ github.event_name == 'push' }}
name: Publish RC to PyPi
uses: dciborow/pyaction@0.0.28
with:
pypi_publish: true
pypi_password: ${{ secrets.PYPI_PASSWORD }}
version_suffix: -rc${{ github.run_number }}-post${{ github.run_attempt }}
- if: ${{ github.event_name == 'pull_request' }}
name: Publish Snapshot to TestPyPi
uses: dciborow/pyaction@0.0.28
with:
pypi_publish: true
pypi_password: ${{ secrets.TEST_PYPI_PASSWORD }}
pypi_repo: testpypi
version_suffix: -post${{ github.run_number }}-dev${{ github.run_attempt }}