21
21
- name : Install dependencies
22
22
run : |
23
23
sudo apt-get update
24
- sudo apt-get install libftdi1-dev mingw-w64
24
+ sudo apt-get install libftdi1-dev mingw-w64 osslsigncode
25
25
# Build libusb from source. This is required to disable usage of udev
26
26
# which in turns simplify static linking because Ubuntu doesn't ship with
27
27
# a static version of udev (and that would require recompiling systemd).
@@ -38,29 +38,34 @@ jobs:
38
38
sudo make install
39
39
- name : Build Linux
40
40
run : |
41
- go build --tags 'netgo osusergo' -ldflags '-s -w -extldflags "-static"'
41
+ go build -v - -tags 'netgo osusergo' -ldflags '-s -w -extldflags "-static"'
42
42
tar cvzf g64drive-linux-amd64.tar.gz g64drive
43
43
env :
44
44
PKG_CONFIG_PATH : /usr/local/lib/pkgconfig:/usr/lib/pkgconfig
45
45
- name : Upload Linux binary
46
46
uses : actions/upload-artifact@v3
47
47
with :
48
- name : g64drive-linux-amd64.tar.gz
49
- path : g64drive-linux-amd64.tar.gz
48
+ name : g64drive-linux-amd64
49
+ path : g64drive
50
50
- name : Build Windows
51
51
run : |
52
- go build -ldflags '-s -w'
52
+ go build -v -ldflags '-s -w' -o g64drive.unsigned.exe
53
+ echo "$WIN_CERTIFICATE_KEY" | base64 --decode > cert.key
54
+ echo "$WIN_CERTIFICATE_PUB" | base64 --decode > cert.pub
55
+ osslsigncode sign -certs cert.pub -key cert.key -t http://timestamp.digicert.com -in g64drive.unsigned.exe -out g64drive.exe
53
56
zip -9 g64drive-windows-amd64.zip g64drive.exe
54
57
env :
55
58
GOOS : windows
56
59
GOARCH : amd64
57
60
CGO_ENABLED : 1
58
61
CC : " x86_64-w64-mingw32-gcc"
62
+ WIN_CERTIFICATE_KEY : ${{ secrets.WIN_CERTIFICATE_KEY }}
63
+ WIN_CERTIFICATE_PUB : ${{ secrets.WIN_CERTIFICATE_PUB }}
59
64
- name : Upload Windows binary
60
65
uses : actions/upload-artifact@v3
61
66
with :
62
- name : g64drive-windows-amd64.zip
63
- path : g64drive-windows-amd64.zip
67
+ name : g64drive-windows-amd64
68
+ path : g64drive.exe
64
69
- name : Release
65
70
uses : softprops/action-gh-release@v1
66
71
if : startsWith(github.ref, 'refs/tags/')
@@ -94,13 +99,13 @@ jobs:
94
99
sed -i.bak "s|$SED_SEARCH|$SED_REPLACE1\\n$SED_REPLACE2|" vendor/github.com/ziutek/ftdi/device.go
95
100
- name : Build
96
101
run : |
97
- go build -ldflags '-s -w'
102
+ go build -v - ldflags '-s -w'
98
103
zip -9 g64drive-mac-amd64.zip g64drive
99
104
- name : Upload Linux binary
100
105
uses : actions/upload-artifact@v3
101
106
with :
102
- name : g64drive-mac-amd64.zip
103
- path : g64drive-mac-amd64.zip
107
+ name : g64drive-mac-amd64
108
+ path : g64drive
104
109
- name : Release
105
110
uses : softprops/action-gh-release@v1
106
111
if : startsWith(github.ref, 'refs/tags/')
0 commit comments