Skip to content

Commit 0f1815e

Browse files
committed
Try GitHub Actions
1 parent d620fa2 commit 0f1815e

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

.github/workflows/build.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build Package
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest # Choose an appropriate runner
8+
steps:
9+
- uses: actions/checkout@v3
10+
11+
- name: Set up Node.js
12+
uses: actions/setup-node@v3
13+
with:
14+
node-version: '16'
15+
16+
- name: Configure NPM Token
17+
run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
18+
19+
- name: Install dependencies
20+
run: npm install
21+
22+
- name: Restore Cache
23+
uses: actions/cache@v3
24+
with:
25+
path: ~/.pkg-cache
26+
key: node16-pkg-${{ github.run_id }}
27+
restore-keys: node16-pkg-
28+
29+
- name: Add pre-built Node for armv7
30+
run: |
31+
mkdir -p ~/.pkg-cache/v3.4
32+
cp .github/workflows/built-v16.16.0-linux-armv7 ~/.pkg-cache/v3.4
33+
34+
- name: Build Package
35+
run: npm run build
36+
37+
- name: Save Cache
38+
uses: actions/cache@v3
39+
with:
40+
path: ~/.pkg-cache
41+
key: node16-pkg-${{ github.run_id }}
42+
43+
- name: Upload Artifact
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: package
47+
path: build/
48+

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
"coverage:integration": "nyc --no-clean npm run test:integration:silent",
153153
"coverage:e2e": "nyc npm run test:e2e:silent",
154154
"coverage:report": "nyc report --reporter=html",
155-
"build": "pkg . --no-bytecode --public",
155+
"build": "pkg .",
156156
"sign:win": "node ./scripts/win-sign.js",
157157
"generate:win-installer": "node ./scripts/generate-win-installer.js",
158158
"generate:manifest": "node ./scripts/generate-manifest.js",

0 commit comments

Comments
 (0)