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