Skip to content

Commit daba46f

Browse files
committed
ci: make publishing dependent on checks
1 parent 2dfb01f commit daba46f

File tree

2 files changed

+23
-29
lines changed

2 files changed

+23
-29
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55

66
jobs:
7-
Ubuntu:
7+
Run Checks:
88
name: "Ubuntu (python-${{ matrix.python }})"
99
timeout-minutes: 10
1010
runs-on: "ubuntu-latest"
@@ -29,3 +29,25 @@ jobs:
2929

3030
- name: Run checks
3131
run: make check
32+
33+
Upload to PyPI:
34+
runs-on: "ubuntu-latest"
35+
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
36+
steps:
37+
- uses: actions/checkout@v2
38+
39+
- name: Setup python
40+
uses: actions/setup-python@v2
41+
with:
42+
python-version: "3.11"
43+
44+
- name: Install pipenv
45+
run: make get-pipenv
46+
47+
- name: Install dependencies
48+
run: make install-deps
49+
50+
- name: Publish to PyPI
51+
run: make upload-to-pypi
52+
env:
53+
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/publish.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)