v1.1.1 #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to npm | |
on: | |
release: | |
types: [published] | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
# Check out the code from the repository | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# Set up Node.js | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "18.x" | |
registry-url: "https://registry.npmjs.org" | |
# Install dependencies | |
- name: Install dependencies | |
run: npm i -g pnpm && pnpm install | |
# Build the project | |
- name: Build the project | |
run: pnpm run build | |
# Publish to npm | |
- name: Publish to npm | |
run: npm publish --access=public | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |