@@ -3,22 +3,42 @@ name: Gitconvex build deploy
3
3
on : push
4
4
5
5
jobs :
6
+ libgit2-setup-test :
7
+ name : Setup Libgit2 with Homebrew
8
+ runs-on : ubuntu-latest
9
+ steps :
10
+ - name : Install libssh2 and libgit2
11
+ run : |
12
+ brew install libssh2
13
+ brew install libgit2
14
+
6
15
gitconvex-test :
7
- name : Gitconvex test
16
+ name : Gitconvex server test
8
17
runs-on : ubuntu-latest
18
+ env :
19
+ PKG_CONFIG_PATH : /home/linuxbrew/.linuxbrew/Cellar/libgit2/1.1.0/lib/pkgconfig/
20
+
9
21
steps :
22
+ - name : Install libgit2 from Homebrew
23
+ run : |
24
+ brew install libssh2
25
+ brew install libgit2
26
+
10
27
- name : Set up Go 1.x
11
28
uses : actions/setup-go@v2
12
29
with :
13
30
go-version : ^1.16
14
31
id : go
15
-
32
+
16
33
- name : Check out code into the Go module directory
17
34
uses : actions/checkout@v2
18
35
19
36
- name : Run Go Test
20
37
run : |
21
- go test -v ./...
38
+ sudo cp /home/linuxbrew/.linuxbrew/Cellar/libgit2/1.1.0/lib/lib* /usr/lib
39
+ export PATH="/home/linuxbrew/.linuxbrew/Cellar/libgit2/1.1.0/lib/:$PATH"
40
+ git config --global user.name "${{ secrets.ACTION_USER_NAME }}" && git config --global user.email "${{ secrets.ACTION_USER_EMAIL }}"
41
+ export GOTESTENV=ci && go test -v ./...
22
42
23
43
# Build for Ubuntu Linux
24
44
build-linux :
@@ -67,14 +87,14 @@ jobs:
67
87
tar -czf gitconvex-linux-amd64-v${{ secrets.TARGET_RELEASE_CHANNEL }}.tar.gz *
68
88
ls -ltr
69
89
cd ..
70
-
90
+
71
91
- name : Github CLI release for Linux
72
92
run : |
73
93
gh version
74
94
echo ${{ secrets.CLI_AUTH_KEY }} > auth.txt
75
95
gh auth login --with-token < auth.txt
76
- gh release upload --repo ${{ secrets.USER_NAME }}/gitconvex ${{ secrets.TARGET_RELEASE_CHANNEL }} ./dist/gitconvex-linux-amd64-v${{ secrets.TARGET_RELEASE_CHANNEL }}.tar.gz --clobber
77
-
96
+ gh release upload --repo ${{ secrets.USER_NAME }}/gitconvex ${{ secrets.TARGET_RELEASE_CHANNEL }} ./dist/gitconvex-linux-amd64-v${{ secrets.TARGET_RELEASE_CHANNEL }}.tar.gz --clobber
97
+
78
98
# Build for MacOS
79
99
build-macos :
80
100
needs : gitconvex-test
@@ -121,7 +141,7 @@ jobs:
121
141
steps :
122
142
- name : Check out code into the Go module directory
123
143
uses : actions/checkout@v2
124
-
144
+
125
145
- name : Add choco packages
126
146
run : |
127
147
choco install wget
@@ -155,17 +175,17 @@ jobs:
155
175
rm C:\\Strawberry\\perl\\bin\\pkg-config.bat
156
176
export PATH="/c/msys64/:/c/msys64/usr/:/c/msys64/usr/bin:$PATH"
157
177
go get -v ./...
158
- ./make.bat build
178
+ ./make.bat build
159
179
160
- - name : Archive ZIP bundle for windows
180
+ - name : Archive ZIP bundle for windows
161
181
run : |
162
182
cd dist
163
183
cp -rp ../etc .
164
184
7z a -r -tzip gitconvex-windows-v${{ secrets.TARGET_RELEASE_CHANNEL }}.zip *
165
185
ls -ltr
166
-
186
+
167
187
- name : Github CLI Release for windows
168
188
run : |
169
189
echo ${{ secrets.CLI_AUTH_KEY }} > auth.txt
170
190
gh auth login --with-token < auth.txt
171
- gh release upload ${{ secrets.TARGET_RELEASE_CHANNEL }} ./dist/gitconvex-windows-v${{ secrets.TARGET_RELEASE_CHANNEL }}.zip --clobber
191
+ gh release upload ${{ secrets.TARGET_RELEASE_CHANNEL }} ./dist/gitconvex-windows-v${{ secrets.TARGET_RELEASE_CHANNEL }}.zip --clobber
0 commit comments