-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (65 loc) · 2.01 KB
/
release.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
name: Release
on:
push:
release:
branches: [main]
types:
- published
paths-ignore:
- "**.md"
- "**.spec.js"
- ".idea"
- ".vscode"
- ".dockerignore"
- "Dockerfile"
- ".gitignore"
- ".github/**"
- "!.github/workflows/release.yml"
defaults:
run:
shell: "bash"
jobs:
build:
# see more environment https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on
runs-on: [ubuntu-20.04]
# https://www.electron.build/multi-platform-build#provided-docker-images
container: electronuserland/builder:wine
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ELECTRON_BUILDER_CACHE: "/root/.cache/electron-builder"
ELECTRON_CACHE: "/root/.cache/electron"
strategy:
matrix:
node: ["14"]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: npm ci
# - name: Run tests
# run: npm run test
# - name: Build dependencies
# run: npm run build
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - uses: actions/upload-artifact@v2
# with:
# name: upload-artifact
# path: |
# release/electron-vue-vite*.exe
# release/electron-vue-vite*.AppImage
# release/electron-vue-vite*.snap
# https://github.com/marketplace/actions/electron-builder-action
- name: Compile & Release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
build_script_name: prebuild
args: --config electron-builder.json5
github_token: ${{ secrets.GITHUB_TOKEN }}
release: ${{ startsWith(github.ref, 'refs/tags/v') && github.event_name == 'push' && needs.get_metadata.outputs.branch == 'main'}}
max_attempts: 3