Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Commit 494bf58

Browse files
Use GH actions to build releases via electron-builder
1 parent f50400a commit 494bf58

File tree

3 files changed

+92
-50
lines changed

3 files changed

+92
-50
lines changed

.github/workflows/release.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,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

electron-builder.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,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 <[email protected]>
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

package.json

Lines changed: 2 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
"check-locales": "node scripts/check-locales.js",
1212
"postinstall": "electron-builder install-app-deps",
1313
"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",
1615
"version": "mv docs/CHANGELOG.md . && changelog-version && mv CHANGELOG.md docs/ && git add docs/CHANGELOG.md"
1716
},
1817
"author": "Secure Scuttlebutt Consortium",
@@ -109,52 +108,5 @@
109108
"electron-builder": "^22.9.1",
110109
"standard": "^16.0.3"
111110
},
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 <[email protected]>"
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": {}
160112
}

0 commit comments

Comments
 (0)