Skip to content

Commit f1157c7

Browse files
committed
test publish
1 parent ab8702c commit f1157c7

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

.github/workflows/publish.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ on:
1111
jobs:
1212
publish:
1313
runs-on: ubuntu-latest
14+
15+
# Explicit permissions for this workflow
16+
permissions:
17+
contents: write # Allows reading and writing repository contents (for git push)
18+
pull-requests: read # Allows reading PR information
19+
actions: read # Allows reading workflow information
20+
1421
# Only run if CI workflow succeeded and the last commit was not made by GitHub Actions
1522
if: >
1623
github.event.workflow_run.conclusion == 'success' &&
@@ -21,9 +28,9 @@ jobs:
2128
- name: Checkout
2229
uses: actions/checkout@v4
2330
with:
24-
# Use a token that can push to protected branches
2531
token: ${{ secrets.GITHUB_TOKEN }}
2632
fetch-depth: 0
33+
ref: main
2734

2835
- name: Setup Node.js
2936
uses: actions/setup-node@v4
@@ -63,7 +70,18 @@ jobs:
6370
- name: Build
6471
run: npm run build
6572

73+
- name: Verify NPM Authentication
74+
run: |
75+
echo "Verifying NPM authentication..."
76+
npm whoami
77+
env:
78+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
79+
6680
- name: Publish to NPM
67-
run: npm publish
81+
run: |
82+
echo "Publishing to NPM..."
83+
npm publish --dry-run
84+
echo "Dry run successful, proceeding with actual publish..."
85+
# npm publish
6886
env:
6987
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)