Skip to content

v0.16.0

v0.16.0 #67

Workflow file for this run

# https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Publish Package to npmjs
on:
release:
types:
- published
jobs:
build-and-publish:
name: Build and Publish
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout the branch
uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: latest
- name: Get pnpm store directory
id: pnpm-cache
run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build & publish the app
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}