Skip to content

Commit 9a6e9e7

Browse files
chore: minor debug
1 parent d1e4698 commit 9a6e9e7

File tree

1 file changed

+15
-23
lines changed

1 file changed

+15
-23
lines changed

.github/workflows/publish.yml

+15-23
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,28 @@ on:
44
push:
55
branches:
66
- main
7-
pull_request:
8-
branches:
9-
- main
107

118
jobs:
12-
versioning:
9+
publish_package:
1310
runs-on: ubuntu-latest
11+
env:
12+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
13+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1414
steps:
1515
# Checkout the code
1616
- name: Checkout code
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@v3
1818

1919
# Set up Node.js environment
2020
- name: Set up Node.js
2121
uses: actions/setup-node@v3
2222
with:
2323
node-version: '20'
24+
registry-url: 'https://registry.npmjs.org/'
2425

25-
# Install dependencies
26+
# Install all dependencies (including devDependencies for lint/test/build)
2627
- name: Install dependencies
27-
run: yarn install --frozen-lockfile --production
28+
run: yarn install
2829

2930
# Run linting
3031
- name: Run lint
@@ -38,21 +39,12 @@ jobs:
3839
- name: Build client
3940
run: yarn build-client
4041

41-
# Semantic release step: Automatically determine the version and release
42-
- name: Semantic Release for versioning
43-
env:
44-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
42+
# Verify NPM_TOKEN
43+
- name: Verify NPM_TOKEN
4644
run: |
47-
yarn release
45+
echo "NPM_TOKEN: $NPM_TOKEN"
46+
curl -H "Authorization: Bearer $NPM_TOKEN" https://registry.npmjs.org/-/whoami
4847
49-
# Optionally, you can include a job to deploy to npm
50-
publish:
51-
needs: release
52-
runs-on: ubuntu-latest
53-
steps:
54-
# Publish to npm
55-
- name: Publish to npm
56-
run: yarn publish --non-interactive
57-
env:
58-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
48+
# Semantic release step: Automatically determine the version and release
49+
- name: Semantic release the package
50+
run: NPM_TOKEN=$NPM_TOKEN yarn release --debug

0 commit comments

Comments
 (0)