-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (67 loc) · 2.12 KB
/
build.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
name: Build
on:
# Allow developers to run this on-demand.
workflow_dispatch:
# Allow the release workflow to trigger this workflow.
workflow_call:
# Validate pull request to confirm that the build is still working.
pull_request:
types:
- opened
- reopened
- synchronize
# Allow at most one instance of this workflow to run at a time.
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
env:
GIT_USER_NAME: github-actions[bot]
GIT_USER_EMAIL: github-actions[bot]@users.noreply.github.com
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: yarn
cache-dependency-path: yarn.lock
- name: Create .env file from GitHub Secrets
run: |
echo "SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}" >> .env
echo "MAIN_VITE_SENTRY_DSN=${{ secrets.SENTRY_DSN }}" >> .env
echo "MAIN_VITE_SENTRY_CRASH_REPORT_DSN=${{ secrets.SENTRY_CRASH_REPORT_DSN }}" >> .env
echo "RENDERER_VITE_SENTRY_DSN=${{ secrets.SENTRY_DSN }}" >> .env
echo "RENDERER_VITE_SENTRY_CRASH_REPORT_DSN=${{ secrets.SENTRY_CRASH_REPORT_DSN }}" >> .env
- name: Install dependencies
run: yarn install
- name: Build Linux
if: matrix.os == 'ubuntu-latest'
run: yarn build:linux
- name: Build MacOS
if: matrix.os == 'macos-latest'
run: yarn build:mac
- name: Build Windows
if: matrix.os == 'windows-latest'
run: yarn build:win
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: phoenix-app-${{ matrix.os }}
path: |
dist/phoenix-*.snap
dist/phoenix-*.deb
dist/phoenix-*.exe
dist/phoenix-*.dmg
dist/phoenix-*.zip
retention-days: 5