Skip to content

Merge pull request #1 from kaiachain/devops/test-cicd #1

Merge pull request #1 from kaiachain/devops/test-cicd

Merge pull request #1 from kaiachain/devops/test-cicd #1

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://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: NPM publish on release
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+*
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- name: Install dependencies and build 🔧
run: npm install --force && npm run build
- name: linting
run: npm run lint
- name: testing
run: npm run test
- name: Publish package on NPM 📦
run: npx pnpm --filter "@kaiachain/kss-*" --filter !"@kaiachain/kss-cli" -r publish --no-git-check --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install kss-cli dependencies
run: cd packages/kss-cli && npm install --force
- name: Publish kss-cli package on NPM 📦
run: npx pnpm --filter "@kaiachain/kss-cli" -r publish --no-git-check --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}