-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (59 loc) · 1.66 KB
/
pi-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
# disabled because it's not build for armv7l
# and it's not obvious how to make github actions build for armv7l
name: Raspberry Pi Build
on:
push:
branches: [ main ]
tags:
- 'v*' # Trigger on version tags
pull_request:
branches: [ main ]
workflow_dispatch:
# Add these permissions at the top level of the workflow
permissions:
contents: write # This allows the workflow to create releases
jobs:
build:
runs-on: ubuntu-latest
env:
npm_config_python: /usr/bin/python3
container:
image: debian:bullseye
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
apt-get update
apt-get install -y python3 python3-pip build-essential zip
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: |
npm ci
- name: Build for Raspberry Pi
run: npm run electron:build:pi
env:
NODE_OPTIONS: --max_old_space_size=512
CI: false # This prevents treating warnings as errors
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: pi-build
path: dist/
- name: Install zip
run: apt-get update && apt-get install -y zip
- name: Create release archive
run: |
cd dist
zip -r ../bice-box-release.zip *
cd ..
- name: Create Release
if: startsWith(github.ref, 'refs/tags/v') # Only create release on version tags
uses: softprops/action-gh-release@v1
with:
files: bice-box-release.zip
draft: false
prerelease: false