Skip to content

Commit 5b76a51

Browse files
ci: add npm publish dry-run to preflight
Uses NPM_TOKEN to validate publish flow without releasing. Signed-off-by: night-slayer18 <samanuaia257@gmail.com>
1 parent 593ab2a commit 5b76a51

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

.github/workflows/preflight.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Preflight Release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
preflight:
8+
name: Preflight checks
9+
runs-on: ubuntu-latest
10+
timeout-minutes: 20
11+
steps:
12+
- uses: actions/checkout@v6
13+
with:
14+
fetch-depth: 0
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v6
17+
with:
18+
node-version: 22
19+
cache: npm
20+
- name: Install dependencies
21+
run: npm ci
22+
- name: Build packages
23+
run: npm run build
24+
- name: Type check
25+
run: npm run type-check
26+
- name: Lint
27+
run: npm run lint
28+
- name: Test
29+
run: npm run test
30+
- name: Pack publishable packages
31+
run: |
32+
npm -w packages/core pack
33+
npm -w packages/cli pack
34+
npm -w packages/plugins/markdown pack
35+
npm -w packages/plugins/examples pack
36+
rm -f opensyntaxhq-*.tgz
37+
- name: Publish dry-run (requires NPM_TOKEN)
38+
env:
39+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
40+
run: |
41+
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
42+
npm -w packages/core publish --dry-run
43+
npm -w packages/cli publish --dry-run
44+
npm -w packages/plugins/markdown publish --dry-run
45+
npm -w packages/plugins/examples publish --dry-run

0 commit comments

Comments
 (0)