Skip to content

Commit

Permalink
chore: fix publish secret and use correct runner os
Browse files Browse the repository at this point in the history
  • Loading branch information
yeliex committed Dec 14, 2023
1 parent f104646 commit 53bbc28
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,34 @@ on:

jobs:
build:
name: Build binary for ${{ matrix.os }} and Node.js ${{ matrix.node-version }}
name: ${{ matrix.os }}/${{ matrix.arch }} Node ${{ matrix.node }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [16, 18, 20]
runs-on: ${{ matrix.os }}
os: [ ubuntu-latest, macos-latest, windows-latest ]
node: [ 16, 18, 20 ]
arch: [ x64 ]

steps:
- name: Checkout
uses: actions/checkout@v3

# See https://github.com/nodejs/node-gyp/issues/2869
- name: Fix node-gyp and Python
run: python3 -m pip install packaging setuptools

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
run_install: |
args: [--ignore-scripts]
- name: Use Node.js ${{ matrix.node-version }}
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
node-version: ${{ matrix.node }}
architecture: ${{ matrix.arch }}
cache: "pnpm"

- name: Build binary
Expand All @@ -39,5 +45,5 @@ jobs:

- name: Release
env:
NODE_PRE_GYP_GITHUB_TOKEN: ${{ secrets.NODE_PRE_GYP_GITHUB_TOKEN }}
NODE_PRE_GYP_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm binary:release
18 changes: 12 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,34 @@ on:

jobs:
test:
name: Test on ${{ matrix.os }} and Node.js ${{ matrix.node-version }}
runs-on: ubuntu-latest
name: ${{ matrix.os }}/${{ matrix.arch }} Node ${{ matrix.node }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [16, 18, 20]
os: [ ubuntu-latest, macos-latest, windows-latest ]
node: [ 16, 18, 20 ]
arch: [ x64 ]

steps:
- name: Checkout
uses: actions/checkout@v3

# See https://github.com/nodejs/node-gyp/issues/2869
- name: Fix node-gyp and Python
run: python3 -m pip install packaging setuptools

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
run_install: |
args: [--ignore-scripts]
- name: Use Node.js ${{ matrix.node-version }}
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
node-version: ${{ matrix.node }}
architecture: ${{ matrix.arch }}
cache: "pnpm"

- name: Build binary
Expand Down

0 comments on commit 53bbc28

Please sign in to comment.