forked from Ikalus1988/MisakaNet
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (32 loc) 路 947 Bytes
/
Copy pathfatal-guard-publish.yml
File metadata and controls
39 lines (32 loc) 路 947 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
name: Publish @misaka-net/fatal-guard
on:
push:
tags:
- "fatal-guard-v*"
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/fatal-guard
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"
- name: Verify zero dependencies
run: |
DEPS=$(node -e "const p=require('./package.json');console.log(p.dependencies?Object.keys(p.dependencies).length:0)")
echo "dependencies: $DEPS"
[ "$DEPS" = "0" ] || { echo "FAIL: expected 0 dependencies"; exit 1; }
- name: Run tests
run: npm test
- name: Publish to npm
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}