-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.16 KB
/
publish-npm.yml
File metadata and controls
44 lines (37 loc) · 1.16 KB
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
# Publish JavaScript packages to the public npm registry.
#
# Prerequisites (one-time):
# - npmjs.com org or user can publish names `airlock-client` and `airlock-mcp`
# - GitHub repo secret NPM_TOKEN: automation access token (classic) with publish scope
#
# Order: airlock-client first, then airlock-mcp (dependency). Re-run workflow if the first
# publish succeeds and the second fails (e.g. propagation delay).
name: Publish npm
on:
workflow_dispatch:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: "20"
registry-url: https://registry.npmjs.org
cache: npm
- name: Install and build
run: |
npm ci
npm run build:js
- name: Publish airlock-client
run: npm publish -w airlock-client --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish airlock-mcp
run: npm publish -w airlock-mcp --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}