File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - main
7+ push :
8+ branches :
9+ - main
10+
11+ jobs :
12+ build-and-test :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+ - name : Set up Node.js
18+ uses : actions/setup-node@v4
19+ with :
20+ node-version : " 18"
21+ - name : Install dependencies
22+ run : npm install
23+ - name : Run ESLint
24+ run : npm run lint || true
25+ - name : Run tests
26+ run : npm test
27+ - name : Build
28+ run : npm run build
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*"
7+
8+ jobs :
9+ publish :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout code
13+ uses : actions/checkout@v4
14+ - name : Set up Node.js
15+ uses : actions/setup-node@v4
16+ with :
17+ node-version : " 18"
18+ registry-url : " https://registry.npmjs.org/"
19+ - name : Install dependencies
20+ run : npm install
21+ - name : Build
22+ run : npm run build
23+ - name : Publish to npm
24+ run : npm publish --access public
25+ env :
26+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments