@sygna/bridge-util 2.0.3 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,33 +1,35 @@
1
1
  name: Build and Deploy
2
+
2
3
  on:
3
4
  push:
4
5
  branches:
5
6
  - master
6
- - feat/fix_npmjs_workflow
7
+ - feat/* # ← 加上你原本就有的 feat 分支
7
8
 
8
9
  permissions:
9
- id-token: write # Required for OIDC
10
+ id-token: write
10
11
  contents: read
11
12
 
12
13
  jobs:
13
- install-and-test:
14
+ publish: # ← 改名更清楚(可選)
14
15
  runs-on: ubuntu-latest
15
16
  steps:
16
- - uses: actions/checkout@v2
17
+ - uses: actions/checkout@v4
18
+
17
19
  - name: Setup Node.js
18
20
  uses: actions/setup-node@v4
19
21
  with:
20
- node-version: '20'
21
- registry-url: https://registry.npmjs.org/
22
+ node-version: '22' # ← 升級到最新 LTS
23
+ registry-url: 'https://registry.npmjs.org/'
24
+
25
+ - name: Upgrade npm to latest (required for Trusted Publishing)
26
+ run: npm install -g npm@latest
27
+
22
28
  - name: Install dependencies
23
- run: |
24
- npm install
29
+ run: npm ci # ← 更乾淨
30
+
25
31
  - name: Test with jest
26
- run: |
27
- npm run test
32
+ run: npm test
33
+
28
34
  - name: Publish
29
- run: |
30
- npm publish --access public
31
- env:
32
- # 使用傳統 Token 繞過 OIDC 比對
33
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
35
+ run: npm publish --access public --provenance # ← 加上 provenance
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sygna/bridge-util",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "repository": {
13
13
  "type": "git",
14
- "url": "https://github.com/sygnaio/sygna-bridge-util"
14
+ "url": "git+https://github.com/sygnaio/sygna-bridge-util.git"
15
15
  },
16
16
  "author": "sygna.tech@coolbitx.com",
17
17
  "license": "MIT",