Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [ 14.x, 16.x, 18.x ]
node-version: [ 20.x, 22.x, 24.x ]
os: [ windows-latest, ubuntu-latest, macOS-latest ]

# Go
steps:
- name: Check out repo
uses: actions/checkout@v3
uses: actions/checkout@v6

- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}

Expand All @@ -48,7 +48,7 @@ jobs:
- name: Notify
uses: sarisia/actions-status-discord@v1
# Only fire alert once
if: github.ref == 'refs/heads/main' && failure() && matrix.node-version == '14.x' && matrix.os == 'ubuntu-latest'
if: github.ref == 'refs/heads/main' && failure() && matrix.node-version == '24.x' && matrix.os == 'ubuntu-latest'
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
title: "build and test"
Expand All @@ -60,33 +60,32 @@ jobs:
# Publish to package registries
publish:
# Setup
permissions:
id-token: write # Required for OIDC
contents: read
needs: build
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest

# Go
steps:
- name: Check out repo
uses: actions/checkout@v3
uses: actions/checkout@v6

- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v6
with:
node-version: lts/*
node-version: 24.x
registry-url: https://registry.npmjs.org/

# Publish to npm
- 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 #'!contains()'' doesn't work lol
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Notify
uses: sarisia/actions-status-discord@v1
Expand Down