This repository has been archived by the owner on Oct 21, 2024. It is now read-only.
version 4.2.0 #14
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
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages | |
name: Publish Node.js Package | |
on: push | |
jobs: | |
build: | |
name: Building and testing Node.js Package. | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- run: npm ci | |
- run: npm test | |
publish-npm: | |
name: Publishing Node.js Package to NPM package registry. | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- run: npm install | |
- run: npm test | |
- uses: JS-DevTools/npm-publish@v1 | |
with: | |
registry: https://registry.npmjs.org/ | |
token: ${{ secrets.NPM_TOKEN }} | |
access: public | |
publish-gpr: | |
name: Publishing Node.js Package to GitHub package registry. | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- run: npm install | |
- run: npm test | |
- uses: JS-DevTools/npm-publish@v1 | |
with: | |
registry: https://npm.pkg.github.com/ | |
token: ${{ secrets.GITHUB_TOKEN }} |