Skip to content

Commit 3bfe70b

Browse files
author
George K. Thiruvathukal
committed
update workflow script for Actions
1 parent 8ff60b4 commit 3bfe70b

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

.github/workflows/release.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,24 @@ on: push
55
jobs:
66
build-n-publish:
77
name: Build and publish Python 🐍 distributions 📦 to PyPI
8-
runs-on: ubuntu-18.04
8+
9+
runs-on: ubuntu-latest
10+
911
steps:
10-
- uses: actions/checkout@master
11-
- name: Set up Python 3.10
12-
uses: actions/setup-python@v1
12+
- uses: actions/checkout@v2
13+
14+
- name: Setup Python
15+
uses: actions/setup-python@v2
1316
with:
14-
python-version: 3.10
15-
- name: Install pypa/build
17+
python-version: '3.10.4'
18+
19+
- name: Install Requirements
1620
run: >-
1721
python -m
1822
pip install
1923
build
2024
--user
25+
2126
- name: Build a binary wheel and a source tarball
2227
run: >-
2328
python -m
@@ -26,8 +31,17 @@ jobs:
2631
--wheel
2732
--outdir dist/
2833
.
29-
- name: Publish distribution 📦 to PyPI
34+
- name: Release to PyPI
3035
if: startsWith(github.ref, 'refs/tags')
31-
uses: pypa/gh-action-pypi-publish@master
36+
uses: pypa/gh-action-pypi-publish@release/v1
3237
with:
38+
user: __token__
3339
password: ${{ secrets.PYPI_API_TOKEN }}
40+
41+
- name: Release to GitHub
42+
uses: softprops/action-gh-release@v1
43+
if: startsWith(github.ref, 'refs/tags/')
44+
with:
45+
files: |
46+
dist/*.whl
47+
dist/*.tar.gz

0 commit comments

Comments
 (0)