-
-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (71 loc) · 2.2 KB
/
build.yml
File metadata and controls
84 lines (71 loc) · 2.2 KB
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
name: Build
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
platform: mac
args: --mac --arm64
- os: ubuntu-latest
platform: linux
args: --linux --x64
- os: windows-latest
platform: win
args: --win --x64
runs-on: ${{ matrix.os }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci
- name: Build app
run: npx electron-vite build
- name: Package and publish
run: npx electron-builder ${{ matrix.args }} --publish always
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_LINK: ${{ matrix.platform == 'mac' && secrets.CSC_LINK || '' }}
CSC_KEY_PASSWORD: ${{ matrix.platform == 'mac' && secrets.CSC_KEY_PASSWORD || '' }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
- uses: actions/upload-artifact@v4
with:
name: vbcdr-${{ matrix.platform }}
path: |
dist/*.dmg
dist/*.zip
dist/*.blockmap
dist/*.AppImage
dist/*.deb
dist/*.exe
dist/latest-*.yml
if-no-files-found: error
publish-release:
if: startsWith(github.ref, 'refs/tags/v')
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Create release if not exists
run: gh release view "${{ github.ref_name }}" || gh release create "${{ github.ref_name }}" --draft
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish release
run: gh release edit "${{ github.ref_name }}" --draft=false
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}