We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b9223b commit 26c796dCopy full SHA for 26c796d
1 file changed
.github/workflows/pypi-publish.yaml
@@ -0,0 +1,32 @@
1
+name: PyPi Publish Workflow
2
+on:
3
+ workflow_call:
4
+ inputs:
5
+ python-version:
6
+ required: false
7
+ type: string
8
+ default: python:3.8
9
+ secrets:
10
+ PYPI_PASSWORD:
11
+ required: true
12
+
13
+jobs:
14
+ publish:
15
+ runs-on: ubuntu-latest
16
+ container:
17
+ image: python:${{ inputs.pythonVersion }}
18
+ needs: test
19
+ if: startsWith(github.ref, 'refs/tags')
20
+ steps:
21
+ - uses: actions/checkout@v2
22
+ - name: Verify tag
23
+ run: |-
24
+ GIT_TAG=${GITHUB_REF/refs\/tags\//}
25
+ LIBRARY_VERSION=$(poetry version -s)
26
+ if [[ "$GIT_TAG" != LIBRARY_VERSION ]]; then exit 1; fi
27
+ - name: Build
28
+ run: poetry build
29
+ - name: Publish
30
+ run: poetry publish
31
+ env:
32
+ POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_PASSWORD }}
0 commit comments