Skip to content

Commit ca460b3

Browse files
authored
Create publish.yml
1 parent 3767be8 commit ca460b3

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/publish.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This workflows will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
name: Upload Python Package
5+
6+
on:
7+
release:
8+
types: [published]
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v1
16+
with:
17+
fetch-depth: 1
18+
19+
- name: Set up Python 3.7
20+
uses: actions/setup-python@v1
21+
with:
22+
python-version: 3.7
23+
24+
- name: Install Poetry
25+
uses: dschep/[email protected]
26+
27+
- name: Set Poetry config
28+
env:
29+
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.POETRY_PYPI_TOKEN_PYPI }}
30+
run: |
31+
poetry config pypi-token.pypi "$POETRY_PYPI_TOKEN_PYPI"
32+
- name: Build with Poetry
33+
run: poetry build
34+
35+
- name: Publish with Poetry
36+
run: poetry publish

0 commit comments

Comments
 (0)