Skip to content

Commit ab1e43b

Browse files
committed
Create separate deploy workflow
1 parent 11559a5 commit ab1e43b

File tree

3 files changed

+40
-35
lines changed

3 files changed

+40
-35
lines changed

.github/workflows/deploy.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: deploy
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v1
13+
14+
- name: Set up Python
15+
uses: actions/setup-python@v1
16+
with:
17+
python-version: "3.9"
18+
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install build
23+
24+
- name: Build package
25+
run: |
26+
python -m build
27+
28+
- name: Publish package to PyPI
29+
uses: pypa/gh-action-pypi-publish@master
30+
with:
31+
user: __token__
32+
password: ${{ secrets.pypi_token }}

.github/workflows/main.yml renamed to .github/workflows/test.yml

Lines changed: 7 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
name: build
1+
name: test
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- "*"
7+
pull_request:
48

59
jobs:
610
compile:
@@ -51,7 +55,7 @@ jobs:
5155
5256
test:
5357
needs: compile
54-
runs-on: [ubuntu-latest]
58+
runs-on: ubuntu-latest
5559

5660
strategy:
5761
fail-fast: false
@@ -87,34 +91,3 @@ jobs:
8791
- name: Test
8892
run: |
8993
tox -e ${{ matrix.tox_env }}
90-
91-
deploy:
92-
93-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
94-
95-
runs-on: ubuntu-latest
96-
97-
needs: test
98-
99-
steps:
100-
- uses: actions/checkout@v1
101-
102-
- name: Set up Python
103-
uses: actions/setup-python@v1
104-
with:
105-
python-version: "3.9"
106-
107-
- name: Install dependencies
108-
run: |
109-
python -m pip install --upgrade pip
110-
pip install build
111-
112-
- name: Build package
113-
run: |
114-
python -m build
115-
116-
- name: Publish package to PyPI
117-
uses: pypa/gh-action-pypi-publish@master
118-
with:
119-
user: __token__
120-
password: ${{ secrets.pypi_token }}

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ and `Catch2 <https://github.com/catchorg/Catch2>`_:
1616
.. |anaconda| image:: https://img.shields.io/conda/vn/conda-forge/pytest-cpp.svg
1717
:target: https://anaconda.org/conda-forge/pytest-cpp
1818

19-
.. |ci| image:: https://github.com/pytest-dev/pytest-cpp/workflows/build/badge.svg
19+
.. |ci| image:: https://github.com/pytest-dev/pytest-cpp/workflows/test/badge.svg
2020
:target: https://github.com/pytest-dev/pytest-cpp/actions
2121

2222
.. |python| image:: https://img.shields.io/pypi/pyversions/pytest-cpp.svg

0 commit comments

Comments
 (0)