Skip to content

Commit 16e18b2

Browse files
authored
ci: fix publishing to pip (#500)
* ci: fix publising to pip * lint: remove a trailing space * created -> released
1 parent 2002145 commit 16e18b2

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

.github/workflows/python-publish.yml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,28 @@
1-
name: Upload Python Package
1+
name: Publish Release
22

33
on:
44
release:
5-
types:
6-
- created
5+
types: [released]
6+
77
jobs:
8-
build:
8+
release:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2
12-
#TODO: Set an API key from PyPI `PYPI_API_KEY` in secrets tab.
13-
- name: Build and publish to pypi
14-
uses: JRubics/poetry-publish@v1
12+
13+
- name: Set up Python 3.8
14+
uses: actions/setup-python@v2
1515
with:
16-
pypi_token: ${{ secrets.PYPI_API_KEY }}
16+
python-version: 3.8
17+
18+
- name: Install dependencies
19+
run: python -m pip install --upgrade poetry
20+
21+
# TODO: Set PYPI_API_TOKEN to api token from pip in secrets
22+
- name: Configure pypi credentials
23+
env:
24+
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
25+
run: poetry config http-basic.pypi __token__ "$PYPI_API_TOKEN"
26+
27+
- name: Publish release to pypi
28+
run: poetry publish --build

0 commit comments

Comments
 (0)