1
- name : Release
1
+ name : Release (MSI/choco test)
2
+
2
3
on :
3
4
push :
4
- tags :
5
- - ' v*'
6
- jobs :
7
- release-linux :
8
- runs-on : ubuntu-latest
9
- strategy :
10
- fail-fast : false
11
- name : Release (Linux)
12
- steps :
13
- - uses : actions/checkout@v2
14
- name : Checkout Austin
15
-
16
- - name : Generate artifacts
17
- run : |
18
- sudo apt-get update
19
- sudo apt-get -y install autoconf build-essential
5
+ branches :
6
+ - packaging/msi
20
7
21
- autoreconf --install
22
- ./configure
23
- make
24
-
25
- export VERSION=$(cat src/austin.h | sed -r -n "s/.*VERSION[ ]+\"(.+)\"/\1/p");
26
-
27
- pushd src
28
- tar -Jcf austin-$VERSION-linux-amd64.tar.xz austin
29
- popd
30
-
31
- - name : Upload artifacts to release
32
- uses : svenstaro/upload-release-action@v2
33
- with :
34
- repo_token : ${{ secrets.GITHUB_TOKEN }}
35
- file : src/austin-*
36
- tag : ${{ github.ref }}
37
- overwrite : true
38
- file_glob : true
39
-
40
- release-win :
8
+ jobs :
9
+ release-win-test :
41
10
runs-on : windows-latest
42
11
strategy :
43
12
fail-fast : false
44
13
name : Release (Windows)
45
14
steps :
46
- - uses : actions/checkout@v2
47
- name : Checkout Austin
15
+ - uses : actions/checkout@v4
16
+ name : Checkout packaging sources
48
17
with :
49
18
fetch-depth : 0
50
19
53
22
run : |
54
23
echo "C:\Program Files (x86)\WiX Toolset v3.11\bin" >> $GITHUB_PATH
55
24
export PATH="/c/Program Files (x86)/`ls /c/Program\ Files\ \(x86\) | grep \"[wW]i[xX] [tT]oolset\"`/bin:$PATH"
56
- export VERSION=$(cat src/austin.h | sed -r -n "s/.* VERSION[ ]+\"(.+)\"/\1/p")
25
+ export VERSION=$(cat src/austin.h | sed -r -n "s/^#define VERSION[ ]+\"(.+)\"/\1/p")
57
26
58
- gcc -s -Wall -O3 -Os -o src/austin src/*.c -lpsapi -lntdll
27
+ touch src/austin.exe
59
28
60
29
git checkout "packaging/msi"
61
30
git checkout master
79
48
- name : Upload to choco
80
49
shell : bash
81
50
run : |
82
- export VERSION=$(cat src/austin.h | sed -r -n "s/.* VERSION[ ]+\"(.+)\"/\1/p")
51
+ export VERSION=$(cat src/austin.h | sed -r -n "s/^#define VERSION[ ]+\"(.+)\"/\1/p")
83
52
export WIN_MSI="austin-$VERSION-win64.msi"
84
53
export WIN_MSI_HASH=$( sha256sum src/$WIN_MSI | head -c 64 )
85
54
git checkout "packaging/msi" -- choco
89
58
/bin/find . -type f -exec sed -i "s/%VERSION%/$VERSION/g" {} \; ;
90
59
choco apikey --key ${{ secrets.CHOCO_APIKEY }} --source https://push.chocolatey.org/
91
60
choco pack
92
- choco push
93
61
popd
94
-
95
- - name : Upload artifacts to release
96
- uses : svenstaro/upload-release-action@v2
97
- with :
98
- repo_token : ${{ secrets.GITHUB_TOKEN }}
99
- file : src/austin-*
100
- tag : ${{ github.ref }}
101
- overwrite : true
102
- file_glob : true
103
-
104
- release-osx :
105
- runs-on : macos-latest
106
- strategy :
107
- fail-fast : false
108
- name : Release (macOS)
109
- steps :
110
- - uses : actions/checkout@v2
111
- name : Checkout Austin
112
-
113
- - name : Generate artifacts
114
- run : |
115
- export VERSION=$(cat src/austin.h | sed -n -E "s/.*VERSION[ ]+\"(.+)\"/\1/p")
116
- echo "::set-output name=version::$VERSION"
117
-
118
- gcc -Wall -O3 -Os -o src/austin src/*.c
119
-
120
- pushd src
121
- zip -r austin-${VERSION}-mac64.zip austin
122
- popd
123
-
124
- - name : Upload artifacts to release
125
- uses : svenstaro/upload-release-action@v2
126
- with :
127
- repo_token : ${{ secrets.GITHUB_TOKEN }}
128
- file : src/austin-*
129
- tag : ${{ github.ref }}
130
- overwrite : true
131
- file_glob : true
0 commit comments