146 lines (141 loc) · 4.38 KB
/
electron.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: Electron CD
on:
push:
branches:
- release
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-latest, windows-latest]
steps:
- name: Context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: yarn install
run: |
yarn install
- name: Build and Package@Linux
if: contains(matrix.os, 'ubuntu')
run: |
yarn package-linux
- name: Mac Certificate-Gen
if: contains(matrix.os, 'macos')
env:
p12base64: ${{ secrets.p12cert }}
run: |
echo "$p12base64" | openssl base64 -d -out cert.p12
- name: Mac Certificate-Install
if: contains(matrix.os, 'macos')
uses: apple-actions/import-codesign-certs@v1
with:
p12-filepath: "cert.p12"
p12-password: ${{ secrets.p12certpassword }}
- name: Build and Package@Mac
if: contains(matrix.os, 'macos')
env:
appleId: ${{ secrets.appleId }}
appleIdPassword: ${{ secrets.appleIdPassword }}
run: |
yarn package-mac
- name: Build and Package@Win
if: contains(matrix.os, 'windows')
run: |
yarn package-win
- name: Version@Linux@Mac
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
run: |
./bin/printversion.sh
- name: Version@Win
if: contains(matrix.os, 'windows')
run: |
./bin/printversion.ps1
- name: Upload artifacts-deb
uses: actions/upload-artifact@v1
if: contains(matrix.os, 'ubuntu')
with:
name: ${{ matrix.os }}
path: release/Zecwallet_Fullnode_${{ env.VERSION }}_amd64.deb
- name: Upload artifacts-AppImage
uses: actions/upload-artifact@v1
if: contains(matrix.os, 'ubuntu')
with:
name: ${{ matrix.os }}
path: release/Zecwallet Fullnode-${{ env.VERSION }}.AppImage
- name: Upload artifacts-dmg
uses: actions/upload-artifact@v1
if: contains(matrix.os, 'macos')
with:
name: ${{ matrix.os }}
path: release/Zecwallet Fullnode-${{ env.VERSION }}.dmg
- name: Upload artifacts-zip
uses: actions/upload-artifact@v1
if: contains(matrix.os, 'windows')
with:
name: ${{ matrix.os }}
path: release/Zecwallet Fullnode-${{ env.VERSION }}-win.zip
- name: Upload artifacts-msi
uses: actions/upload-artifact@v1
if: contains(matrix.os, 'windows')
with:
name: ${{ matrix.os }}
path: release/Zecwallet Fullnode ${{ env.VERSION }}.msi
job_signbinaries:
name: Consolidate and sign binaries
needs: build
runs-on: ubuntu-latest
steps:
- name: Context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Version
run: |
./bin/printversion.sh
- name: Download ubuntu
uses: actions/download-artifact@v1
with:
name: ubuntu-18.04
- name: Download windows
uses: actions/download-artifact@v1
with:
name: windows-latest
- name: Download MacOS
uses: actions/download-artifact@v1
with:
name: macos-latest
- name: Get gpg key
env:
gpgbase64: ${{ secrets.gpgkey }}
run: |
echo "$gpgbase64" | openssl base64 -d -out gpg.key
- name: Import gpg key
run: |
gpg --allow-secret-key-import --import gpg.key
mkdir release
cp windows-latest/* release/
cp ubuntu-18.04/* release/
cp macos-latest/* release/
- name: Sign binaries
env:
APP_VERSION: ${{ env.VERSION }}
run: |
bin/signbinaries.sh
tar -cf Zecwallet-artifacts-$APP_VERSION.tar.gz release/signatures*.zip release/Zecwallet*
- name: Upload final artifacts
uses: actions/upload-artifact@v1
with:
name: zecwallet-artifacts
path: Zecwallet-artifacts-${{ env.VERSION }}.tar.gz