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 : release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *.*.*'
7+
8+ jobs :
9+ release :
10+ name : Release
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v3
15+
16+ - name : Set up Python 3.10
17+ uses : actions/setup-python@v4
18+ with :
19+ python-version : " 3.10"
20+
21+ - name : Install Poetry
22+ run : |
23+ curl -sSL https://install.python-poetry.org | python - -y
24+ - name : Update PATH
25+ run : echo "$HOME/.local/bin" >> $GITHUB_PATH
26+
27+ - name : Build project for distribution
28+ run : poetry build
29+
30+ - name : Check Version
31+ id : check-version
32+ run : |
33+ [[ "$(poetry version --short)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo prerelease=true >> $GITHUB_OUTPUT
34+
35+ - name : Create Release
36+ uses : ncipollo/release-action@v1
37+ with :
38+ artifacts : " dist/*"
39+ token : ${{ secrets.GITHUB_TOKEN }}
40+ draft : false
41+ prerelease : steps.check-version.outputs.prerelease == 'true'
42+
43+ - name : Publish to PyPI
44+ env :
45+ POETRY_PYPI_TOKEN_PYPI : ${{ secrets.PYPI }}
46+ run : poetry publish
You can’t perform that action at this time.
0 commit comments