generated from Hbbb/go-backend-template
-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (49 loc) · 1.76 KB
/
release.yaml
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
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Publish
on:
push:
tags: v*
jobs:
publish:
strategy:
matrix:
os: [ubuntu-latest, macos-14, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
env:
NodeVersion: 20.x
GoVersion: ^1.21.4
steps:
- uses: actions/checkout@v4
- name: Use Go ${{ env.GoVersion }}
uses: actions/setup-go@v5
with:
go-version: ${{ env.GoVersion }}
- run: go mod download
working-directory: ./cli
- name: Use Node.js ${{ env.NodeVersion }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NodeVersion }}
cache: 'npm'
- run: npm i
- run: npx vite build
- name: Decode and save the certificate
if: matrix.os == 'macos-latest'
run: |
echo "${{ secrets.MAC_CERTS }}" | base64 --decode > ./electron-cert.p12
- name: setup keychain
if: matrix.os == 'macos-latest'
run: |
security import ./electron-cert.p12 -P ${{ secrets.mac_certs_password }}
- name: electron mac os security identities
if: matrix.os == 'macos-latest'
run: security find-identity -v
- name: Build distribution
run: npx electron-builder -p always
env:
CSC_LINK: ${{ secrets.mac_certs }}
CSC_KEY_PASSWORD: ${{ secrets.MAC_CERTS_PASSWORD }}
APPLEID: ${{ secrets.APPLE_ID }}
APPLEIDPASS: ${{ secrets.APPLE_ID_PASSWORD }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}