File tree 1 file changed +15
-23
lines changed
1 file changed +15
-23
lines changed Original file line number Diff line number Diff line change 4
4
push :
5
5
branches :
6
6
- main
7
- pull_request :
8
- branches :
9
- - main
10
7
11
8
jobs :
12
- versioning :
9
+ publish_package :
13
10
runs-on : ubuntu-latest
11
+ env :
12
+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
13
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
14
14
steps :
15
15
# Checkout the code
16
16
- name : Checkout code
17
- uses : actions/checkout@v2
17
+ uses : actions/checkout@v3
18
18
19
19
# Set up Node.js environment
20
20
- name : Set up Node.js
21
21
uses : actions/setup-node@v3
22
22
with :
23
23
node-version : ' 20'
24
+ registry-url : ' https://registry.npmjs.org/'
24
25
25
- # Install dependencies
26
+ # Install all dependencies (including devDependencies for lint/test/build)
26
27
- name : Install dependencies
27
- run : yarn install --frozen-lockfile --production
28
+ run : yarn install
28
29
29
30
# Run linting
30
31
- name : Run lint
@@ -38,21 +39,12 @@ jobs:
38
39
- name : Build client
39
40
run : yarn build-client
40
41
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
46
44
run : |
47
- yarn release
45
+ echo "NPM_TOKEN: $NPM_TOKEN"
46
+ curl -H "Authorization: Bearer $NPM_TOKEN" https://registry.npmjs.org/-/whoami
48
47
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
You can’t perform that action at this time.
0 commit comments