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: 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 | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |