Skip to content

Thinning

Thinning #6

Workflow file for this run

name: Publish store2state to npmjs
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "19.x"
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: npm install
- name: Run unit tests
run: npm test
deploy:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "19.x"
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: npm install
- name: Build package
run: npm run build
- name: Prepare package for publish
run: |
mkdir publish
cp -r dist package.json README.md LICENSE publish/
- name: Publish to npm
run: cd publish && npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}