1
1
name : release
2
2
on :
3
3
push :
4
+ branches :
5
+ - ' *'
4
6
tags :
5
- - ' *'
7
+ - ' *'
6
8
7
9
jobs :
8
10
job :
@@ -17,54 +19,65 @@ jobs:
17
19
18
20
steps :
19
21
- uses : actions/checkout@v3
22
+ if : startsWith(github.ref, 'refs/tags/')
20
23
with :
21
24
submodules : true
22
25
23
26
- uses : lukka/get-cmake@latest
24
27
25
28
- name : Restore from cache and setup vcpkg executable and data files.
29
+ if : startsWith(github.ref, 'refs/tags/')
26
30
uses : lukka/run-vcpkg@v11
27
31
with :
28
32
vcpkgJsonGlob : ' vcpkg.json'
29
33
vcpkgGitCommitId : d5ec528843d29e3a52d745a64b469f810b2cedbf
30
34
31
35
- name : Set up Python 3.11
36
+ if : startsWith(github.ref, 'refs/tags/')
32
37
uses : actions/setup-python@v4
33
38
with :
34
39
python-version : 3.11
35
40
36
41
- name : Setup system
42
+ if : startsWith(github.ref, 'refs/tags/')
37
43
run : |
38
44
sudo apt-get update
39
45
sudo apt-get install -y linux-libc-dev liburing-dev
40
46
41
47
- name : Setup pnpm
48
+ if : startsWith(github.ref, 'refs/tags/')
42
49
uses : pnpm/action-setup@v4
43
50
with :
44
51
version : 10
45
52
46
53
- name : Install Node.js
54
+ if : startsWith(github.ref, 'refs/tags/')
47
55
uses : actions/setup-node@v4
48
56
with :
49
57
node-version : 20
50
58
cache : ' pnpm'
51
59
cache-dependency-path : ' ./www/pnpm-lock.yaml'
52
60
53
61
- name : Build
62
+ if : startsWith(github.ref, 'refs/tags/')
54
63
run : bash build.sh
55
64
56
65
- name : Install Python dependencies
66
+ if : startsWith(github.ref, 'refs/tags/')
57
67
run : pip install -r test/requirements.txt
58
68
59
69
- name : Install pytest dependencies
70
+ if : startsWith(github.ref, 'refs/tags/')
60
71
run : pip install pytest-md pytest-emoji
61
72
62
73
- uses : pavelzw/pytest-action@v2
74
+ if : startsWith(github.ref, 'refs/tags/')
63
75
with :
64
76
emoji : false
65
77
custom-arguments : -p no:sugar test
66
78
67
79
- name : Create Release
80
+ if : startsWith(github.ref, 'refs/tags/')
68
81
uses : ncipollo/release-action@v1
69
82
with :
70
83
artifacts : " hs5*.xz"
0 commit comments