Skip to content

1.11.0

1.11.0 #23

Workflow file for this run

# This workflow will run tests using node and then emit 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}}