Skip to content

update ci

update ci #3

name: Publish to NPM
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the latest code
- name: Checkout code
uses: actions/checkout@v3
# Step 2: Install Node.js and pnpm
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'pnpm'
check-latest: true
# Step 3: Install pnpm
- name: Install pnpm
run: |
npm install -g pnpm
pnpm config set store-dir ~/.pnpm-store
# Step 4: Install dependencies using pnpm
- name: Install dependencies
run: pnpm install
# Step 5: Run linting
- name: Lint code
run: pnpm run lint
# Step 6: Run tests
- name: Run tests
run: pnpm run test
# Step 7: Build the library
- name: Build the library
run: pnpm run build
# Step 8: Publish to NPM (on successful build)
- name: Publish to NPM
if: github.ref == 'refs/heads/main'
run: pnpm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets

Check failure on line 52 in .github/workflows/publish-to-npm.yml

View workflow run for this annotation

GitHub Actions / Publish to NPM

Invalid workflow file

The workflow is not valid. .github/workflows/publish-to-npm.yml (Line: 52, Col: 26): The expression is not closed. An unescaped ${{ sequence was found, but the closing }} sequence was not found.