Skip to content

2.6.0

2.6.0 #34

Workflow file for this run

# 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: Publishing Package
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test:unit
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://npm.pkg.github.com/
scope: '@yaohaixiao'
- name: Install dependencies
run: npm ci
- name: Create Temporary .npmrc
run: echo @yaohaixiao:registry=https://npm.pkg.github.com >> .npmrc
- name: Publish Package
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.PUBLISH_TOKEN}}