Skip to content

Merge pull request #230 from metaDAOproject/feat/compatibility-and-tw… #138

Merge pull request #230 from metaDAOproject/feat/compatibility-and-tw…

Merge pull request #230 from metaDAOproject/feat/compatibility-and-tw… #138

Workflow file for this run

name: Publish to npm
on:
push:
branches:
- main
paths: "package.json"
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "21"
registry-url: "https://registry.npmjs.org"
always-auth: true
- name: Check if version has been updated
id: check
uses: EndBug/version-check@v2
- name: Install pnpm
if: steps.check.outputs.changed
run: npm install -g pnpm
- name: Install dependencies
if: steps.check.outputs.changed
run: pnpm install
- name: Build
if: steps.check.outputs.changed
run: pnpm run build # Update or remove this line depending on your build process
- name: Publish to npm
if: steps.check.outputs.changed
run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}