Skip to content

Merge pull request #5 from NexGenStudioDev/dev #2

Merge pull request #5 from NexGenStudioDev/dev

Merge pull request #5 from NexGenStudioDev/dev #2

Workflow file for this run

name: Publish Package
on:
push:
branches:
- master
tags:
- 'v*' # optional: publish on version tags like v1.0.0
jobs:
publish:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js 18
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install dependencies
run: pnpm install
- name: Build package
run: pnpm build
# - name: Run tests (optional)
# run: pnpm test
- name: Authenticate to npm
run: npm config set //registry.npmjs.org/:_authToken=${NPM_TOKEN}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish to npm
run: pnpm publish --access public --no-git-checks