Skip to content

Commit 10e7dce

Browse files
committed
update publish action
1 parent e6ef274 commit 10e7dce

File tree

1 file changed

+3
-23
lines changed

1 file changed

+3
-23
lines changed

.github/workflows/publish.yml

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,9 @@ permissions:
1010
id-token: write # Required for OIDC (Trusted Publishing)
1111

1212
jobs:
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
@@ -42,5 +22,5 @@ jobs:
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

0 commit comments

Comments
 (0)