Skip to content

Node.js Package Release Workflow #37

Node.js Package Release Workflow

Node.js Package Release Workflow #37

Workflow file for this run

name: Node.js Package Release Workflow
on:
release:
types: [created]
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: refs/heads/main
- uses: actions/setup-node@v3
with:
node-version: '20'
registry-url: https://registry.npmjs.org/
# Install pnpm
- name: Install pnpm
run: npm install -g pnpm
# Setup Git
- name: Setup Git
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
# Version bump
# - name: Bump package version
# run: |
# git checkout main
# pnpm version patch
# git push origin main --follow-tags
# env:
# GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
# Install dependencies
- run: pnpm install
# Build the package
- run: pnpm run build
# Publish to npm
- run: pnpm publish --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}