forked from pavloniym/anilibrix
-
Notifications
You must be signed in to change notification settings - Fork 5
83 lines (68 loc) · 2.52 KB
/
build-mac.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: Build macOS
on:
workflow_dispatch:
jobs:
release:
permissions: write-all
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13]
node-version: [14.x]
env:
ELECTRON_CACHE: ${{ github.workspace }}/.cache/electron
ELECTRON_BUILDER_CACHE: ${{ github.workspace }}/.cache/electron-builder
ADS_URLS: ${{ secrets.ADS_URLS }}
VK_APP_ID: ${{ secrets.VK_APP_ID }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
API_ENDPOINT_URL: ${{ secrets.API_ENDPOINT_URL }}
YANDEX_TRACKING_ID: ${{ secrets.YANDEX_TRACKING_ID }}
STATIC_ENDPOINT_URL: ${{ secrets.STATIC_ENDPOINT_URL }}
DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
EXT_API_SERVER: ${{ secrets.EXT_API_SERVER }}
PYTHON: python3.10
NODE_GYP_FORCE_PYTHON: python3.10
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache Node.js modules
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Cache Electron
uses: actions/cache@v1
with:
path: ${{ github.workspace }}/.cache/electron
key: ${{ runner.os }}-electron-cache-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
restore-keys: |
${{ runner.os }}-electron-cache-
- name: Cache Electron-Builder
uses: actions/cache@v1
with:
path: ${{ github.workspace }}/.cache/electron-builder
key: ${{ runner.os }}-electron-builder-cache-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
restore-keys: |
${{ runner.os }}-electron-builder-cache-
- name: Remove other python
run: sudo rm -rf /System/Library/Frameworks/Python.framework/
- name: Install [email protected]
run: brew install [email protected]
- name: Install dependencies
run: yarn
- name: Run build
run: npm run release:mac
- name: Archive results
uses: actions/upload-artifact@v3
with:
name: Save artifacts
path: release/*.dmg