Skip to content

Commit e59df1c

Browse files
committed
added publish to pypi workflow
1 parent d7f6d0d commit e59df1c

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- '**'
7+
env:
8+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN_PETDEFACE }}
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: 3.11
20+
cache: 'poetry'
21+
22+
- name: Install dependencies
23+
run: |
24+
pipx install poetry
25+
poetry install
26+
27+
- name: Build
28+
run: |
29+
poetry build
30+
31+
- name: Publish
32+
if: '!contains(github.ref_name, "test")'
33+
run: |
34+
echo "Publishing to PyPI..."
35+
poetry config pypi-token.pypi $PYPI_TOKEN
36+
poetry publish

0 commit comments

Comments
 (0)