From 0f1815e50b310e41b0484e46d61e5367f8a02a1c Mon Sep 17 00:00:00 2001 From: Julien Vanier Date: Thu, 2 May 2024 14:00:19 -0400 Subject: [PATCH] Try GitHub Actions --- .github/workflows/build.yml | 48 +++++++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..26e587e1b --- /dev/null +++ b/.github/workflows/build.yml @@ -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/ + diff --git a/package.json b/package.json index 694bdb70a..8822de127 100644 --- a/package.json +++ b/package.json @@ -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",