Skip to content

Commit 96e2159

Browse files
chore: minor debug
1 parent d1e4698 commit 96e2159

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

.github/workflows/publish.yml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,25 @@ on:
44
push:
55
branches:
66
- main
7-
pull_request:
8-
branches:
9-
- main
107

118
jobs:
129
versioning:
1310
runs-on: ubuntu-latest
1411
steps:
1512
# Checkout the code
1613
- name: Checkout code
17-
uses: actions/checkout@v2
14+
uses: actions/checkout@v3
1815

1916
# Set up Node.js environment
2017
- name: Set up Node.js
2118
uses: actions/setup-node@v3
2219
with:
2320
node-version: '20'
21+
registry-url: 'https://registry.npmjs.org/'
2422

25-
# Install dependencies
23+
# Install all dependencies (including devDependencies for lint/test/build)
2624
- name: Install dependencies
27-
run: yarn install --frozen-lockfile --production
25+
run: yarn install
2826

2927
# Run linting
3028
- name: Run lint
@@ -38,21 +36,33 @@ jobs:
3836
- name: Build client
3937
run: yarn build-client
4038

39+
# Verify NPM_TOKEN
40+
- name: Verify NPM_TOKEN
41+
run: |
42+
echo "NPM_TOKEN: $NPM_TOKEN"
43+
echo "secrets.NPM_TOKEN: ${{ secrets.NPM_TOKEN }}"
44+
45+
curl -H "Authorization: Bearer $NPM_TOKEN" https://registry.npmjs.org/-/whoami
46+
4147
# Semantic release step: Automatically determine the version and release
4248
- name: Semantic Release for versioning
4349
env:
4450
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4551
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
46-
run: |
47-
yarn release
52+
run: yarn release
4853

49-
# Optionally, you can include a job to deploy to npm
5054
publish:
51-
needs: release
55+
needs: versioning
5256
runs-on: ubuntu-latest
5357
steps:
58+
- name: Checkout code
59+
uses: actions/checkout@v3
60+
61+
- name: Install production dependencies
62+
run: yarn install --frozen-lockfile --production
63+
5464
# Publish to npm
5565
- name: Publish to npm
5666
run: yarn publish --non-interactive
5767
env:
58-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
68+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)