File tree Expand file tree Collapse file tree 2 files changed +40
-25
lines changed Expand file tree Collapse file tree 2 files changed +40
-25
lines changed Original file line number Diff line number Diff line change
1
+ name : Build distribution 📦
2
+
3
+ on :
4
+ workflow_call :
5
+ workflow_dispatch :
6
+ pull_request :
7
+
8
+ jobs :
9
+ build-package :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v4
13
+
14
+ - name : Set up Python
15
+ uses : actions/setup-python@v5
16
+ with :
17
+ python-version : " 3.10"
18
+
19
+ - name : Install hatch
20
+ run : |
21
+ pip install hatch --user
22
+
23
+ - name : Run tests
24
+ run : |
25
+ python3 -m hatch run test
26
+
27
+ - name : Run linting
28
+ run : |
29
+ python3 -m hatch run lint:all
30
+
31
+ - name : Build a wheel and a source tarball
32
+ run : |
33
+ python3 -m hatch build
Original file line number Diff line number Diff line change 4
4
5
5
jobs :
6
6
build-package :
7
- name : Build distribution 📦
8
- runs-on : ubuntu-latest
7
+ uses : ./.github/workflows/build-package.yml
9
8
9
+ check-tag :
10
+ runs-on : ubuntu-latest
10
11
steps :
11
12
- id : check_ref
12
13
run : echo "::set-output name=match::$(echo '${{ github.ref }}' | grep -Pq '^refs/tags/v\d+\.\d+\.\d+$' && echo true || echo false)"
13
14
shell : bash
14
-
15
15
- name : Check if tag is valid
16
16
if : steps.check_ref.outputs.match != 'true'
17
17
run : exit 1
18
18
19
+ upload-artifact :
20
+ needs : build-package
21
+ runs-on : ubuntu-latest
22
+ steps :
19
23
- uses : actions/checkout@v4
20
-
21
- - name : Set up Python
22
- uses : actions/setup-python@v5
23
- with :
24
- python-version : " 3.10"
25
-
26
- - name : Install hatch
27
- run : |
28
- pip install hatch --user
29
-
30
- - name : Run tests
31
- run : |
32
- python3 -m hatch run test
33
-
34
- - name : Run linting
35
- run : |
36
- python3 -m hatch run lint:all
37
-
38
- - name : Build a wheel and a source tarball
39
- run : |
40
- python3 -m hatch build
41
-
42
24
- name : Store the distribution packages
43
25
uses : actions/upload-artifact@v4
44
26
with :
You can’t perform that action at this time.
0 commit comments