Skip to content

Commit d8cc384

Browse files
chore: minor debug
1 parent d1e4698 commit d8cc384

File tree

3 files changed

+43
-38
lines changed

3 files changed

+43
-38
lines changed

.github/workflows/publish.yml

+18-22
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,16 @@ 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
47+
rm -rf .npmrc
4848
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
49+
# Semantic release step: Automatically determine the version and release
50+
- name: Semantic release the package
5751
env:
58-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
52+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
53+
run: yarn release --debug
54+

.releaserc

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"branches": [
3+
"main"
4+
],
5+
"plugins": [
6+
"@semantic-release/commit-analyzer",
7+
"@semantic-release/release-notes-generator",
8+
"@semantic-release/changelog",
9+
"@semantic-release/npm",
10+
[
11+
"@semantic-release/git",
12+
{
13+
"assets": [
14+
"package.json",
15+
"yarn.lock",
16+
"CHANGELOG.md"
17+
],
18+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
19+
}
20+
]
21+
],
22+
"npm": {
23+
"token": "NPM_TOKEN"
24+
}
25+
}

release.config.mjs

-16
This file was deleted.

0 commit comments

Comments
 (0)