Skip to content

feature/sc-126222/update-the-particle-cli-executable-in-workbench #29

feature/sc-126222/update-the-particle-cli-executable-in-workbench

feature/sc-126222/update-the-particle-cli-executable-in-workbench #29

Workflow file for this run

name: Build Package
on:
push:
branches: [ "master", "feature/cli-installer-v2" ] # should change once we have a stable branch
pull_request:
branches: [ "master", "feature/cli-installer-v2" ]
env:
PARTICLE_WINDOWS_SIGNING_CERT: ${{ secrets.PARTICLE_WINDOWS_SIGNING_CERT }}
PARTICLE_WINDOWS_SIGNING_PASS: ${{ secrets.PARTICLE_WINDOWS_SIGNING_PASS }}
jobs:
#call-tests:
# uses: ./.github/workflows/tests.yml
# secrets: inherit
build:
#needs: call-tests
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 .circleci/built-v16.16.0-linux-armv7 ~/.pkg-cache/v3.4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm,arm64
- name: Set up ldid
uses: MOZGIII/install-ldid-action@v1
with:
tag: v2.1.5-procursus7
- name: Build Package
run: npm run build
- name: 'Install makensis (apt)'
run: sudo apt update && sudo apt install -y nsis nsis-pluginapi
- name: Download and unzip osslsigncode binary
run: |
mkdir osslsigncode
curl -LJO https://github.com/mtrojnar/osslsigncode/releases/download/2.6/osslsigncode-2.6-ubuntu-20.04.zip
unzip osslsigncode-2.6-ubuntu-20.04.zip -d osslsigncode
chmod +x osslsigncode/bin/osslsigncode
- name: Add osslsigncode to PATH
run: |
echo "export PATH=\$PATH:$(pwd)/osslsigncode/bin" >> $GITHUB_ENV
- name: Sign Windows package
run: |
npm run sign:win
- name: Generate Windows installer
run: |
npm run generate:win-installer
- 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/