Skip to content

Commit cf5efa6

Browse files
committed
use our own publication workflow
1 parent 409b627 commit cf5efa6

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed
Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,26 @@
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-
41
name: Upload Python Package
52

63
on:
7-
release:
8-
types: [created]
4+
push:
5+
tags: '[0-9]+\.*'
96

107
jobs:
118
deploy:
12-
139
runs-on: ubuntu-latest
14-
1510
steps:
16-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v4
1712
- name: Set up Python
18-
uses: actions/setup-python@v2
13+
uses: actions/setup-python@v5
1914
with:
20-
python-version: '3.x'
15+
python-version: '3.8'
2116
- name: Install dependencies
2217
run: |
2318
python -m pip install --upgrade pip
2419
pip install setuptools wheel twine
25-
- name: Build and publish
26-
env:
27-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
28-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
20+
- name: Build package
2921
run: |
3022
python setup.py sdist bdist_wheel
31-
twine upload dist/*
23+
- name: Publish package
24+
uses: pypa/gh-action-pypi-publish@release/v1
25+
with:
26+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)