Skip to content

Commit ed6395e

Browse files
committed
Fix issue with the deployment to the PyPI.
1 parent e46c25a commit ed6395e

File tree

1 file changed

+45
-2
lines changed

1 file changed

+45
-2
lines changed

.github/workflows/three_x.yml

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,11 @@ jobs:
225225
- name: Run PyFunceble as defined by tox_run_mariadb.ini
226226
run: tox -c tox_run_mariadb.ini
227227

228-
deploy_to_pypi:
228+
deploy_dev_to_pypi:
229229
needs: [run_cli, run_cli_mariadb]
230230
name: "Deploy 📦 to the PyPi"
231231

232-
if: github.event_name == 'push'
232+
if: github.event_name == 'push' && github.ref == 'refs/heads/3.x'
233233

234234
runs-on: "${{ matrix.os }}"
235235

@@ -268,6 +268,49 @@ jobs:
268268
password: ${{ secrets.PYPI_DEV_API_TOKEN }}
269269
skip_existing: true
270270

271+
deploy_stable_to_pypi:
272+
needs: [run_cli, run_cli_mariadb]
273+
name: "Deploy 📦 to the PyPi"
274+
275+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
276+
277+
runs-on: "${{ matrix.os }}"
278+
279+
strategy:
280+
fail-fast: false
281+
matrix:
282+
python_version:
283+
- "3.9"
284+
os:
285+
- ubuntu-latest
286+
287+
steps:
288+
- uses: actions/checkout@v2
289+
name: Clone repository
290+
291+
- name: Set up Python ${{ matrix.python_version }}
292+
uses: actions/setup-python@v2
293+
with:
294+
python-version: ${{ matrix.python_version }}
295+
296+
- name: Install dependencies
297+
run: |
298+
pip install twine wheel setuptools
299+
300+
- name: Build 📦
301+
run: |
302+
python setup.py sdist bdist_wheel
303+
304+
- name: Check 📦
305+
run: |
306+
twine check dist/*
307+
308+
- name: Publish 📦 to PyPI
309+
uses: pypa/gh-action-pypi-publish@master
310+
with:
311+
password: ${{ secrets.PYPI_API_TOKEN }}
312+
skip_existing: true
313+
271314
deploy_to_docker_hub:
272315
needs: [run_cli, run_cli_mariadb]
273316
name: "Deploy 📦 to the Docker Hub"

0 commit comments

Comments
 (0)