From 07ef032161f7d0a75c1047561ee46aadfd7129e7 Mon Sep 17 00:00:00 2001 From: Richard Race <1273965+richrace@users.noreply.github.com> Date: Sun, 23 Jun 2024 17:47:39 +0100 Subject: [PATCH] Update package building --- .github/workflows/build.yml | 27 +++++++++++++++++++++++---- .github/workflows/release.yml | 29 +++++++++++++++++++++++++---- 2 files changed, 48 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 96bd0ce..7a94d29 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,12 +33,10 @@ jobs: - name: build run: npm run make - build: - runs-on: ${{ matrix.os }} + build-windows: + runs-on: windows-latest strategy: fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v4 @@ -49,3 +47,24 @@ jobs: run: npm ci - name: build run: npm run make + + build-ubuntu: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + + - uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: libusb-1.0-0-dev + version: 1.0 + + - name: install dependencies + run: npm ci + - name: build + run: npm run make diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5aef408..c746f08 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,12 +36,10 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: npm run publish - release: - runs-on: ${{ matrix.os }} + release-windows: + runs-on: windows-latest strategy: fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v4 @@ -54,3 +52,26 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: npm run publish + + release-ubuntu: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + + - uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: libusb-1.0-0-dev + version: 1.0 + + - name: install dependencies + run: npm ci + - name: publish + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: npm run publish