forked from assistant-ui/assistant-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 914 Bytes
/
npm-publish.yaml
File metadata and controls
42 lines (34 loc) · 914 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
36
37
38
39
40
41
42
name: npm Publish
on:
repository_dispatch:
types: [npm-publish]
permissions:
id-token: write
contents: read
env:
CI: true
jobs:
publish:
name: Publish to npm
if: github.ref == 'refs/heads/main'
environment: npm Publish
runs-on: ubuntu-latest
steps:
- name: Checkout code repository
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Setup node.js
uses: actions/setup-node@v6
with:
node-version: 24
# No cache - hardened against cache poisoning for sensitive publish operations
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Publish to npm
run: pnpm ci:publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}