Skip to content

Use node v18 on gha #82

Use node v18 on gha

Use node v18 on gha #82

Workflow file for this run

on: push
name: CI
jobs:
build:
name: Build
strategy:
fail-fast: false
matrix:
node-version: [ 18.x ]
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Use current yarn
run: yarn set version stable
- name: yarn install
run: yarn install
publish-release:
name: Publish release
needs: build
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Set up Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: 'https://registry.npmjs.org'
- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: npm publish --access public