File tree Expand file tree Collapse file tree 1 file changed +3
-23
lines changed Expand file tree Collapse file tree 1 file changed +3
-23
lines changed Original file line number Diff line number Diff line change @@ -10,29 +10,9 @@ permissions:
1010 id-token : write # Required for OIDC (Trusted Publishing)
1111
1212jobs :
13- build-and-test :
14- runs-on : ubuntu-latest
15- steps :
16- - uses : actions/checkout@v4
17- - uses : actions/setup-node@v4
18- with :
19- node-version : " 20"
20- - name : Update npm
21- run : npm install -g npm@latest # Ensure latest npm for Trusted Publishing
22- - run : npm ci
23- - run : npm test # Your unit tests
24- - run : npm run wdio # Your WDIO CLI E2E tests for runtime behavior/data leaks
25- - name : Snyk Scan
26- uses : snyk/actions/node@master
27- env :
28- SNYK_TOKEN : ${{ secrets.SNYK_TOKEN }} # Store as repo secret (rotate as needed)
29- with :
30- command : test --severity-threshold=high # Block on high-severity/malicious issues
31-
3213 publish :
33- needs : build-and-test # Only publish if tests/scans pass
3414 runs-on : ubuntu-latest
35- # environment: production # Uncomment if using GitHub environment for approvals
15+ # environment: production # Uncomment for approval gates
3616 steps :
3717 - uses : actions/checkout@v4
3818 - uses : actions/setup-node@v4
4222 - name : Update npm
4323 run : npm install -g npm@latest
4424 - run : npm ci
45- - run : npm run build
46- - run : npm publish --access public # For scoped packages; OIDC handles auth
25+ - run : npm run build --if-present
26+ - run : npm publish --access public
You can’t perform that action at this time.
0 commit comments