Skip to content

Commit bbaaa2c

Browse files
author
=
committed
fix publish package
1 parent b3d7b19 commit bbaaa2c

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

.github/workflows/python-publish.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,28 @@
44
name: Upload Python Package
55

66
on:
7-
push:
8-
branches:
9-
- master
7+
release:
8+
types: [created]
109

1110
jobs:
1211
deploy:
1312

1413
runs-on: ubuntu-latest
1514

1615
steps:
17-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v3
1817
- name: Set up Python
19-
uses: actions/setup-python@v2
18+
uses: actions/setup-python@v3
2019
with:
2120
python-version: '3.x'
2221
- name: Install dependencies
2322
run: |
2423
python -m pip install --upgrade pip
25-
pip install setuptools wheel twine build
26-
- name: Build and publish
24+
pip install setuptools wheel twine
25+
- name: Build package
26+
run: python -m build
27+
- name: Publish package
2728
env:
2829
TWINE_USERNAME: '__token__'
2930
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
30-
run: |
31-
python -m build
32-
twine upload --repository testpypi dist/*
31+
run: twine upload --repository testpypi dist/*

0 commit comments

Comments
 (0)