-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (74 loc) · 2.27 KB
/
publish.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
on:
push:
tags:
- 'v*'
name: 'Build Release'
jobs:
buildx64:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
arch: [ x64 ]
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v1
with:
node-version: 20.x
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Restore Cache
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Build App Dependencies
run: yarn deps:all
- name: Build App
run: yarn build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
buildarmv7:
name: Build armv7
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pguyot/arm-runner-action@v2
name: Build Dependencies
with:
base_image: raspios_lite:latest
cpu: cortex-a7
image_additional_mb: 10240
bind_mount_repository: true
commands: |
sudo apt update && sudo apt install git ruby -y
wget https://nodejs.org/dist/v20.11.1/node-v20.11.1-linux-armv7l.tar.xz
tar -xf node-v20.11.1-linux-armv7l.tar.xz
cd node-v20.11.1-linux-armv7l
sudo cp -R * /usr/
cd ..
npm i -g yarn
yarn install --frozen-lockfile
yarn deps:all
- name: Use Node.js 20.x
uses: actions/setup-node@v1
with:
node-version: 20.x
- name: Fix Permissions
run: |
sudo rm -rf node_modules
sudo chown runner . -R
yarn install --frozen-lockfile
- name: Build App
run: yarn build armv7l
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}