Skip to content

Commit ad86b68

Browse files
committed
Rewrite the package publish pipeline
1 parent 25f318e commit ad86b68

1 file changed

Lines changed: 24 additions & 23 deletions

File tree

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
name: Upload Python Package
2-
32
on:
4-
release:
5-
types: [created]
6-
3+
release:
4+
types: [created]
75
jobs:
8-
deploy:
9-
runs-on: ubuntu-latest
10-
steps:
11-
- uses: actions/checkout@v1
12-
- name: Set up Python
13-
uses: actions/setup-python@v1
14-
with:
15-
python-version: '3.x'
16-
- name: Install dependencies
17-
run: |
18-
python -m pip install --upgrade pip
19-
pip install setuptools wheel twine
20-
- name: Build and publish
21-
env:
22-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
23-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
24-
run: |
25-
python setup.py sdist bdist_wheel
26-
twine upload dist/*
6+
deploy:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4.1.1
10+
- name: Setup Python (3.8)
11+
uses: actions/setup-python@v5
12+
with:
13+
python-version: "3.8"
14+
- name: Upgrade Pip, Build, Twine
15+
run: |
16+
python -m pip install --upgrade pip
17+
python -m pip install --upgrade build
18+
python -m pip install twine
19+
- name: Build Source
20+
run: |
21+
python -m build
22+
- name: Publish Source
23+
env:
24+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
25+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
26+
run: |
27+
twine upload dist/*

0 commit comments

Comments
 (0)