Skip to content

Commit 696f91b

Browse files
committed
ci: Add workflow to release packages to PyPI
1 parent 0c1c3c6 commit 696f91b

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

.github/workflows/pypi-release.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: "Publish to PyPI"
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
7+
jobs:
8+
build-and-release:
9+
name: "Build and make a release"
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: "3.11"
19+
20+
- name: Upgrade pip
21+
run: |
22+
python -m pip install -U pip
23+
24+
- name: Configure environments
25+
run: |
26+
python --version
27+
28+
- name: Install dependencies
29+
run: |
30+
pip install -e ".[test]"
31+
32+
- name: Run tests
33+
run: |
34+
pytest --color=yes -v -s
35+
env:
36+
PYTHONIOENCODING: UTF-8
37+
38+
- name: Build a binary wheel
39+
run: >-
40+
GPUSTAT_VERSION=${{ steps.tag.outputs.TAG_NAME }} python setup.py sdist
41+
42+
- name: Publish to PyPI
43+
uses: pypa/gh-action-pypi-publish@master
44+
with:
45+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)