Skip to content

2.3.0-RC.0

2.3.0-RC.0 #115

Workflow file for this run

name: Node CI
on: [ push, pull_request ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 16.x, 18.x, 20.x ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm it
# Publish to package registries
publish:
# Setup
needs: test
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
# Go
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
# Publish to npm
- name: Publish @RC to npm
if: contains(github.ref, 'RC')
run: npm publish --tag RC --access public
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 }}
- name: Notify
uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
title: "npm publish"
color: 0x222222
username: GitHub Actions