Skip to content

Commit

Permalink
Try GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
monkbroc committed May 2, 2024
1 parent d620fa2 commit 0f1815e
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
48 changes: 48 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build Package

on: [push]

jobs:
build:
runs-on: ubuntu-latest # Choose an appropriate runner
steps:
- uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Configure NPM Token
run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}

- name: Install dependencies
run: npm install

- name: Restore Cache
uses: actions/cache@v3
with:
path: ~/.pkg-cache
key: node16-pkg-${{ github.run_id }}
restore-keys: node16-pkg-

- name: Add pre-built Node for armv7
run: |
mkdir -p ~/.pkg-cache/v3.4
cp .github/workflows/built-v16.16.0-linux-armv7 ~/.pkg-cache/v3.4
- name: Build Package
run: npm run build

- name: Save Cache
uses: actions/cache@v3
with:
path: ~/.pkg-cache
key: node16-pkg-${{ github.run_id }}

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: package
path: build/

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
"coverage:integration": "nyc --no-clean npm run test:integration:silent",
"coverage:e2e": "nyc npm run test:e2e:silent",
"coverage:report": "nyc report --reporter=html",
"build": "pkg . --no-bytecode --public",
"build": "pkg .",
"sign:win": "node ./scripts/win-sign.js",
"generate:win-installer": "node ./scripts/generate-win-installer.js",
"generate:manifest": "node ./scripts/generate-manifest.js",
Expand Down

0 comments on commit 0f1815e

Please sign in to comment.