Skip to content

1.3.1

1.3.1 #217

Workflow file for this run

name: Node CI
on: [ push, pull_request ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [ 18, 20, 22 ]
os: [ windows-latest, ubuntu-latest, macOS-latest ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
- uses: sarisia/actions-status-discord@v1
# Only fire alert once
if: github.ref == 'refs/heads/main' && failure()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
title: "build and test"
color: 0x222222
username: GitHub Actions
publish:
needs: build
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org/
- run: npm install
- name: Publish @RC to npm
if: contains(github.ref, 'RC')
run: npm publish --tag RC
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish @latest to npm
if: contains(github.ref, 'RC') == false
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
title: "npm publish"
color: 0x222222
username: GitHub Actions