-
Notifications
You must be signed in to change notification settings - Fork 6
83 lines (70 loc) · 2.24 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
78
79
80
81
82
83
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:
runs-on: ${{ matrix.os }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VITE_NFT_STORAGE_TOKEN: ${{ secrets.NFT_STORAGE_TOKEN }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
node: ["18"]
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: yarn install
# - 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/mintgarden-studio*.exe
# release/mintgarden-studio*.AppImage
# release/mintgarden-studio*.snap
- name: Prepare for app notarization
if: startsWith(matrix.os, 'macos')
# Import Apple API key for app notarization on macOS
run: |
mkdir -p ~/private_keys/
echo '${{ secrets.API_KEY }}' > ~/private_keys/AuthKey_${{ secrets.API_KEY_ID }}.p8
# https://github.com/marketplace/actions/electron-builder-action
- name: Compile & Release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
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'}}
mac_certs: ${{ secrets.MAC_CERTS }}
mac_certs_password: ${{ secrets.MAC_CERTS_PASSWORD }}
env:
API_KEY_ID: ${{ secrets.API_KEY_ID }}
API_KEY_ISSUER_ID: ${{ secrets.API_KEY_ISSUER_ID }}