File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : pypi-publish
2+
3+ on :
4+ release :
5+ types : [published]
6+ workflow_dispatch :
7+ inputs :
8+ tag :
9+ description : Tag/version to publish
10+ required : true
11+ jobs :
12+
13+ deploy :
14+ runs-on : ubuntu-20.04
15+ steps :
16+ - name : Checkout
17+ uses : actions/checkout@v2
18+ # Extract the version to 'version' based on workflow_dispatch or triggered tag in the published event
19+ - name : Extract version
20+ shell : bash
21+ run : |
22+ if [ "${{ github.event.inputs.tag }}" != "" ]; then
23+ echo "::set-output name=tag::$(echo ${{ github.event.inputs.tag }} | sed s/^v//)"
24+ else
25+ echo "::set-output name=tag::$(echo ${GITHUB_REF##*/} | sed s/^v//)"
26+ fi
27+ id : version
28+
29+ - name : Python build and make package
30+ run : make package-python PACKAGE_VERSION=${{ steps.version.outputs.tag }}
31+
32+ - name : Python publish package
33+ uses : pypa/gh-action-pypi-publish@release/v1
34+ with :
35+ user : __token__
36+ password : ${{ secrets.PYPI_API_TOKEN }}
37+ packages_dir : dist/
38+ verbose : true
39+
40+ - name : Build release as latest
41+ working-directory : clients/python
42+ run : bundle exec jekyll build -d _site -b /
You can’t perform that action at this time.
0 commit comments