chore: support node 22 #250
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: builds | |
on: | |
push: | |
tags: | |
- v* | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-2019, macos-12, ubuntu-20.04] | |
node: [18, 20, 21, 22] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- run: corepack enable | |
- run: pnpm i --frozen-lockfile | |
env: | |
npm_config_build_from_source: true | |
- run: pnpm tsd | |
- run: pnpm test | |
- run: pnpm prebuild | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.os }}-${{ matrix.node }}-binary | |
path: 'prebuilds/**/*.tar.gz' | |
alpine: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
node: [18, 20, 21, 22] | |
fail-fast: true | |
container: | |
image: node:${{ matrix.node }}-alpine | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
apk add --no-cache python3 make g++ | |
- run: corepack enable | |
- run: pnpm i --frozen-lockfile | |
env: | |
npm_config_build_from_source: true | |
- run: pnpm tsd | |
- run: pnpm test | |
- run: pnpm prebuild | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: alpine-${{ matrix.node }}-binary | |
path: 'prebuilds/**/*.tar.gz' | |
deploy: | |
runs-on: ubuntu-20.04 | |
needs: [alpine, build] | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- uses: actions/download-artifact@v4 | |
with: | |
path: prebuilds | |
- id: vars | |
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} | |
- uses: eine/tip@master | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ steps.vars.outputs.tag }} | |
files: | | |
./prebuilds/**/*.tar.gz |