File tree Expand file tree Collapse file tree 3 files changed +196
-3
lines changed
Expand file tree Collapse file tree 3 files changed +196
-3
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+ - id : python
15+ uses : actions/setup-python@v2
16+ with :
17+ python-version : " 3.10"
18+ architecture : " x64"
19+
20+ - uses : Gr1N/setup-poetry@v7
21+
22+ - id : poetry-cache
23+ run : echo "::set-output name=dir::$(poetry config virtualenvs.path)"
24+
25+ - uses : actions/cache@v2
26+ with :
27+ path : ${{ steps.poetry-cache.outputs.dir }}
28+ key : ${{ runner.os }}-poetry-${{ steps.python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
29+
30+ - run : poetry install
31+
32+ - run : |
33+ echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
34+
35+ - name : Build and Publish Package
36+ run : |
37+ poetry build
38+ poetry publish -u ${{secrets.PYPI_USERNAME}} -p ${{secrets.PYPI_PASSWORD}}
39+ gh release upload --clobber ${{ env.TAG_NAME }} dist/*.tar.gz dist/*.whl
40+ env :
41+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments