-
Notifications
You must be signed in to change notification settings - Fork 34
140 lines (134 loc) · 4.52 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: Build
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
env:
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
RUDDERSTACK_CLIENT_ID: ${{ secrets.RUDDERSTACK_CLIENT_ID }}
jobs:
build_windows:
runs-on: windows-latest
concurrency:
group: build-windows-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout repository.
uses: actions/checkout@v4
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: '20'
- uses: pnpm/action-setup@v3
with:
standalone: ${{ runner.os == 'Windows' }}
- name: Install node-gyp
run: pnpm add --global node-gyp
shell: bash
- name: Reconfigure git to use HTTP authentication
run: >
git config --global url."https://github.com/".insteadOf
ssh://[email protected]/
- name: Authenticate with private NPM package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Install modules.
run: pnpm run setup
- name: setup env file
run: |
echo "VITE_LD_ENVIRONMENT_ID=${{ secrets.VITE_LD_ENVIRONMENT_ID_TEST }}" > .env
echo "VITE_IPFS_API=${{ secrets.VITE_IPFS_API }}" >> .env
- name: Build artifacts.
run: pnpm dist:win
- name: Upload EXE.
uses: actions/upload-artifact@v4
with:
name: win-setup
path: dist/HyperPlay*.exe
retention-days: 7
if-no-files-found: error
compression-level: 3
build_linux:
runs-on: ubuntu-latest
concurrency:
group: build-linux-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Update deps
run: sudo apt-get update
- name: Install libarchive-tools for pacman build # Related https://github.com/electron-userland/electron-builder/issues/4181
run: sudo apt-get install libarchive-tools
- name: Checkout repository.
uses: actions/checkout@v4
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: '20'
- uses: pnpm/action-setup@v3
with:
standalone: ${{ runner.os == 'Windows' }}
- name: Install node-gyp
run: pnpm add --global node-gyp
shell: bash
- name: Reconfigure git to use HTTP authentication
run: >
git config --global url."https://github.com/".insteadOf
ssh://[email protected]/
- name: Authenticate with private NPM package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Install modules.
run: pnpm run setup
- name: setup env file
run: |
echo "VITE_LD_ENVIRONMENT_ID=${{ secrets.VITE_LD_ENVIRONMENT_ID_TEST }}" > .env
echo "VITE_IPFS_API=${{ secrets.VITE_IPFS_API }}" >> .env
- name: Build deb artifact
run: pnpm dist:linux:ci:deb
- name: Build rpm artifact
run: pnpm dist:linux:ci:rpm
- name: Build pacman artifact
run: pnpm dist:linux:ci:pacman
build_mac_x64:
runs-on: macos-13
concurrency:
group: build-mac-x64-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout repository.
uses: actions/checkout@v4
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: '20'
- uses: pnpm/action-setup@v3
with:
standalone: ${{ runner.os == 'Windows' }}
- name: Install node-gyp
run: pnpm add --global node-gyp
shell: bash
- name: Reconfigure git to use HTTP authentication
run: >
git config --global url."https://github.com/".insteadOf
ssh://[email protected]/
- name: Authenticate with private NPM package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Install modules.
run: pnpm run setup
- name: setup env file
run: |
echo "VITE_LD_ENVIRONMENT_ID=${{ secrets.VITE_LD_ENVIRONMENT_ID_TEST }}" > .env
echo "VITE_IPFS_API=${{ secrets.VITE_IPFS_API }}" >> .env
- name: Build artifacts.
run: pnpm run dist:mac:x64
env:
NOTARIZE: false
- name: Upload Intel build.
uses: actions/upload-artifact@v4
with:
name: mac-dmg-x64
path: dist/HyperPlay*x64.dmg
retention-days: 7
if-no-files-found: error
compression-level: 3