-
Notifications
You must be signed in to change notification settings - Fork 4
48 lines (40 loc) · 1.3 KB
/
npm-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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 }}