File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - v*
7+
8+ jobs :
9+ release :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v3
13+
14+ - name : Setup Python environment
15+ uses : ./.github/actions/setup-python
16+
17+ - name : Get Version
18+ id : version
19+ run : |
20+ echo "VERSION=$(poetry version -s)" >> $GITHUB_OUTPUT
21+ echo "TAG_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
22+ echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
23+
24+ - name : Check Version
25+ if : steps.version.outputs.VERSION != steps.version.outputs.TAG_VERSION
26+ run : exit 1
27+
28+ - name : Build and Publish Package
29+ run : |
30+ poetry build
31+ poetry publish -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }}
32+ gh release upload --clobber ${{ steps.version.outputs.TAG_NAME }} dist/*.tar.gz dist/*.whl
33+ env :
34+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments