File tree 4 files changed +70
-21
lines changed
4 files changed +70
-21
lines changed Original file line number Diff line number Diff line change 1
1
name : deploy
2
2
3
3
on :
4
- push :
5
- tags :
6
- - " v*"
4
+ workflow_dispatch :
5
+ inputs :
6
+ version :
7
+ description : ' Release version'
8
+ required : true
9
+ default : ' 1.2.3'
10
+
7
11
jobs :
12
+
13
+ package :
14
+ runs-on : ubuntu-latest
15
+ env :
16
+ SETUPTOOLS_SCM_PRETEND_VERSION : ${{ github.event.inputs.version }}
17
+
18
+ steps :
19
+ - uses : actions/checkout@v3
20
+
21
+ - name : Build and Check Package
22
+
23
+
8
24
deploy :
25
+ needs : package
9
26
runs-on : ubuntu-latest
27
+ environment : deploy
28
+ permissions :
29
+ id-token : write # For PyPI trusted publishers.
30
+ contents : write # For tag and release notes.
10
31
11
32
steps :
12
- - uses : actions/checkout@v1
33
+ - uses : actions/checkout@v3
13
34
14
- - name : Set up Python
15
- uses : actions/setup-python@v1
35
+ - name : Download Package
36
+ uses : actions/download-artifact@v3
16
37
with :
17
- python-version : " 3.9"
38
+ name : Packages
39
+ path : dist
18
40
19
- - name : Install dependencies
20
- run : |
21
- python -m pip install --upgrade pip
22
- pip install build
41
+ - name : Publish package to PyPI
42
+
23
43
24
- - name : Build package
44
+ - name : Push tag
25
45
run : |
26
- python -m build
46
+ git config user.name "pytest bot"
47
+ git config user.email "[email protected] "
48
+ git tag --annotate --message=v${{ github.event.inputs.version }} v${{ github.event.inputs.version }} ${{ github.sha }}
49
+ git push origin v${{ github.event.inputs.version }}
27
50
28
- - name : Publish package to PyPI
29
- uses : pypa/gh-action-pypi-publish@master
30
- with :
31
- user : __token__
32
- password : ${{ secrets.pypi_token }}
51
+ - name : GitHub Release
52
+ uses : softprops/action-gh-release@v1
Original file line number Diff line number Diff line change 6
6
- " *"
7
7
pull_request :
8
8
9
+ concurrency :
10
+ group : ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress : true
12
+
9
13
jobs :
10
14
compile :
11
15
53
57
!tests/**/*.xml
54
58
!tests/**/*.o
55
59
60
+ package :
61
+ runs-on : ubuntu-latest
62
+ steps :
63
+ - uses : actions/checkout@v3
64
+ - name : Build and Check Package
65
+
66
+
56
67
test :
57
- needs : compile
68
+ needs : [ compile, package]
58
69
runs-on : ubuntu-latest
59
70
60
71
strategy :
@@ -79,15 +90,25 @@ jobs:
79
90
uses : actions/setup-python@v2
80
91
with :
81
92
python-version : ${{ matrix.python }}
93
+
82
94
- name : Download compiled tests
83
- uses : actions/download-artifact@v2
95
+ uses : actions/download-artifact@v3
84
96
with :
85
97
name : tests
86
98
path : tests
99
+
100
+ - name : Download Package
101
+ uses : actions/download-artifact@v3
102
+ with :
103
+ name : Packages
104
+ path : dist
105
+
87
106
- name : Install Tox
88
107
run : |
89
108
chmod a+x -R tests
90
109
pip install tox
110
+
91
111
- name : Test
112
+ shell : bash
92
113
run : |
93
- tox -e ${{ matrix.tox_env }}
114
+ tox run -e ${{ matrix.tox_env }} --installpkg `find dist/*.tar.gz`
Original file line number Diff line number Diff line change
1
+ Here are the steps on how to make a new release.
2
+
3
+ 1. Create a ``release-VERSION `` branch from ``upstream/main ``.
4
+ 2. Update ``CHANGELOG.rst ``.
5
+ 3. Push the branch to ``upstream ``.
6
+ 4. Once all tests pass, start the ``deploy `` workflow manually.
7
+ 5. Merge the PR.
Original file line number Diff line number Diff line change 19
19
20
20
description = "Use pytest's runner to discover and execute C++ tests" ,
21
21
long_description = open ("README.rst" ).read (),
22
+ long_description_content_type = "text/x-rst" ,
22
23
license = "MIT" ,
23
24
keywords = "pytest test unittest" ,
24
25
url = "http://github.com/pytest-dev/pytest-cpp" ,
You can’t perform that action at this time.
0 commit comments