Commit 494bf580c82a2a98221bea97cdaee5b5e52d3fc6
Use GH actions to build releases via electron-builder
Daan Wynen committed on 1/30/2021, 10:14:59 PMParent: f50400a95d8c5a977f0f39ee8b857c5ee9cdd630
Files changed
.github/workflows/release.yml | added |
package.json | changed |
electron-builder.yml | added |
.github/workflows/release.yml | ||
---|---|---|
@@ -1,0 +1,49 @@ | ||
1 … | +name: Prepare Release | |
2 … | + | |
3 … | +on: | |
4 … | + push: | |
5 … | + tags: | |
6 … | + - 'v[0-9]+.*' | |
7 … | + | |
8 … | +jobs: | |
9 … | + release: | |
10 … | + runs-on: ${{ matrix.os }} | |
11 … | + | |
12 … | + strategy: | |
13 … | + fail-fast: false | |
14 … | + matrix: | |
15 … | + os: [macos-latest, ubuntu-latest, windows-latest] | |
16 … | + | |
17 … | + steps: | |
18 … | + - name: Install Build Dependencies | |
19 … | + if: runner.os == 'linux' | |
20 … | + run: | | |
21 … | + sudo apt update | |
22 … | + sudo apt-get install -y \ | |
23 … | + libopenjp2-tools \ | |
24 … | + automake \ | |
25 … | + libgconf-2-4 \ | |
26 … | + libtool \ | |
27 … | + libxext-dev \ | |
28 … | + libxkbfile-dev \ | |
29 … | + libxtst-dev \ | |
30 … | + build-essential | |
31 … | + | |
32 … | + - name: Check out Git repository | |
33 … | + uses: actions/checkout@v2 | |
34 … | + | |
35 … | + - name: Install Node.js, NPM and Yarn | |
36 … | + uses: actions/setup-node@v1 | |
37 … | + with: | |
38 … | + node-version: 14 | |
39 … | + | |
40 … | + - name: Build/release Electron app | |
41 … | + uses: samuelmeuli/action-electron-builder@v1 | |
42 … | + with: | |
43 … | + # GitHub token, automatically provided to the action | |
44 … | + # (No need to define this secret in the repo settings) | |
45 … | + github_token: ${{ secrets.github_token }} | |
46 … | + | |
47 … | + # If the commit is tagged with a version (e.g. "v1.0.0"), | |
48 … | + # release the app after building | |
49 … | + release: true |
package.json | ||
---|---|---|
@@ -10,10 +10,9 @@ | ||
10 | 10 … | "start": "electron index.js", |
11 | 11 … | "check-locales": "node scripts/check-locales.js", |
12 | 12 … | "postinstall": "electron-builder install-app-deps", |
13 | 13 … | "release-notes": "node scripts/release-notes.js", |
14 | - "build": "electron-builder --publish=never", | |
15 | - "dist": "electron-builder -c.snap.publish=github", | |
14 … | + "dist": "electron-builder --publish=never", | |
16 | 15 … | "version": "mv docs/CHANGELOG.md . && changelog-version && mv CHANGELOG.md docs/ && git add docs/CHANGELOG.md" |
17 | 16 … | }, |
18 | 17 … | "author": "Secure Scuttlebutt Consortium", |
19 | 18 … | "license": "AGPL-3.0", |
@@ -108,53 +107,6 @@ | ||
108 | 107 … | "electron": "^8.5.5", |
109 | 108 … | "electron-builder": "^22.9.1", |
110 | 109 … | "standard": "^16.0.3" |
111 | 110 … | }, |
112 | - "optionalDependencies": {}, | |
113 | - "build": { | |
114 | - "appId": "org.ssbc.patchwork", | |
115 | - "linux": { | |
116 | - "category": "Network", | |
117 | - "target": [ | |
118 | - { | |
119 | - "target": "AppImage", | |
120 | - "arch": [ | |
121 | - "x64", | |
122 | - "arm64" | |
123 | - ] | |
124 | - }, | |
125 | - { | |
126 | - "target": "snap", | |
127 | - "arch": [ | |
128 | - "x64" | |
129 | - ] | |
130 | - }, | |
131 | - { | |
132 | - "target": "deb", | |
133 | - "arch": [ | |
134 | - "x64" | |
135 | - ] | |
136 | - } | |
137 | - ] | |
138 | - }, | |
139 | - "deb": { | |
140 | - "packageCategory": "net", | |
141 | - "priority": "optional", | |
142 | - "maintainer": "Michael Williams <michael.williams@enspiral.com>" | |
143 | - }, | |
144 | - "dmg": { | |
145 | - "icon": "build/dmg/icon.icns" | |
146 | - }, | |
147 | - "win": { | |
148 | - "publisherName": "Secure Scuttlebutt Consortium", | |
149 | - "target": [ | |
150 | - { | |
151 | - "target": "nsis", | |
152 | - "arch": [ | |
153 | - "x64", | |
154 | - "ia32" | |
155 | - ] | |
156 | - } | |
157 | - ] | |
158 | - } | |
159 | - } | |
111 … | + "optionalDependencies": {} | |
160 | 112 … | } |
electron-builder.yml | |||
---|---|---|---|
@@ -1,0 +1,41 @@ | |||
1 … | +directories: | ||
2 … | + output: dist | ||
3 … | + buildResources: build | ||
4 … | +appId: org.ssbc.patchwork | ||
5 … | + | ||
6 … | +linux: | ||
7 … | + category: Network | ||
8 … | + target: | ||
9 … | + - target: AppImage | ||
10 … | + arch: | ||
11 … | + - x64 | ||
12 … | + - arm64 | ||
13 … | + - armv7l | ||
14 … | + - target: snap | ||
15 … | + arch: | ||
16 … | + - x64 | ||
17 … | + - arm64 | ||
18 … | + - armv7l | ||
19 … | + - target: deb | ||
20 … | + arch: | ||
21 … | + - x64 | ||
22 … | + - arm64 | ||
23 … | + - armv7l | ||
24 … | +deb: | ||
25 … | + packageCategory: net | ||
26 … | + priority: optional | ||
27 … | + maintainer: Daan Wynen <patchwork@muchmuch.coffee> | ||
28 … | +snap: | ||
29 … | + publish: github | ||
30 … | + | ||
31 … | +dmg: | ||
32 … | + icon: build/dmg/icon.icns | ||
33 … | + | ||
34 … | +win: | ||
35 … | + publisherName: Secure Scuttlebutt Consortium | ||
36 … | + target: | ||
37 … | + - target: nsis | ||
38 … | + arch: | ||
39 … | + - x64 | ||
40 … | + - ia32 | ||
41 … | + - arm64 |
Built with git-ssb-web