File tree 3 files changed +38
-38
lines changed
3 files changed +38
-38
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,14 @@ 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
+ curl -H "Authorization: Bearer $NPM_TOKEN" https://registry.npmjs.org/-/whoami
48
46
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
47
+ # Semantic release step: Automatically determine the version and release
48
+ - name : Semantic release the package
49
+ run : rm -rf "$PWD/.npmrc" && yarn release
57
50
env :
58
- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
51
+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
52
+
Original file line number Diff line number Diff line change
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
+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments