Skip to content

Commit a3dbf9b

Browse files
authored
Update publish_pypi GithubAction (#49)
1 parent 24fd2b6 commit a3dbf9b

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

.github/workflows/publish_pypi.yml

+14-4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
jobs:
99
build_and_deploy:
1010
runs-on: ubuntu-latest
11+
if: github.repository == 'python-graphblas/graphblas-algorithms'
1112
defaults:
1213
run:
1314
shell: bash -l {0}
@@ -21,11 +22,20 @@ jobs:
2122
with:
2223
python-version: "3.8"
2324
- name: Install build dependencies
24-
run: python -m pip install setuptools wheel
25-
- name: Build wheel
26-
run: python setup.py sdist bdist_wheel
25+
run: |
26+
python -m pip install --upgrade pip
27+
python -m pip install build twine
28+
- name: Build wheel and sdist
29+
run: python -m build --sdist --wheel
30+
- uses: actions/upload-artifact@v3
31+
with:
32+
name: releases
33+
path: dist
34+
if-no-files-found: error
35+
- name: Check with twine
36+
run: python -m twine check --strict dist/*
2737
- name: Publish to PyPI
28-
uses: pypa/gh-action-pypi-publish@master
38+
uses: pypa/gh-action-pypi-publish@v1.6.4
2939
with:
3040
user: __token__
3141
password: ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)