-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (27 loc) · 873 Bytes
/
npm.yml
File metadata and controls
35 lines (27 loc) · 873 Bytes
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
name: Publish NPM Package
on:
workflow_dispatch: # Trigger manually through GitHub Actions interface
push:
tags:
- "v*" # Trigger on version tags (e.g., v1.0.0)
env:
NODE_VERSION: lts/hydrogen
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Publish to npm
run: scripts/publish-lib.sh
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}