Skip to content

Commit 9b8421e

Browse files
author
abel
committed
(fix) Update release GitHub workflow to use Poetry to publish the SDK package
1 parent 494869e commit 9b8421e

File tree

2 files changed

+11
-22
lines changed

2 files changed

+11
-22
lines changed

.github/workflows/pre-commit.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ jobs:
1515
uses: actions/setup-python@v3
1616
- name: Install poetry
1717
run: python -m pip install poetry
18-
19-
- name: Configure poetry
20-
run: python -m poetry config virtualenvs.in-project true
21-
2218
- name: Cache the virtualenv
2319
id: cache-venv
2420
uses: actions/cache@v3

.github/workflows/release.yml

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,19 @@ name: Publish Python 🐍 distribution 📦 to PyPI
22

33
on:
44
release:
5-
types: [created]
5+
types: [published]
66

77
jobs:
88
deploy:
9-
runs-on: ubuntu-20.04
9+
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@master
13-
- name: Set up Python 3.7
14-
uses: actions/setup-python@v2
15-
with:
16-
python-version: 3.7
17-
- name: Install dependencies
18-
run: |
19-
python -m pip install --upgrade pip
20-
pip install setuptools wheel twine
21-
- name: Build and publish
22-
env:
23-
TWINE_USERNAME: __token__
24-
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
25-
run: |
26-
python setup.py sdist bdist_wheel
27-
twine upload --skip-existing dist/*
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
- name: Install Python
15+
uses: actions/setup-python@v3
16+
- name: Install poetry
17+
run: python -m pip install poetry
18+
- run: poetry config pypi-token.pypi "${{ secrets.PYPI_API_KEY }}"
19+
- name: Publish package
20+
run: poetry publish --build

0 commit comments

Comments
 (0)