Skip to content

Commit bc54a29

Browse files
authored
chore: trusted publisher (#4020)
* chore: trusted publisher * chore: 提权 * chore: publishConfig
1 parent 20c8822 commit bc54a29

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.github/workflows/tag-push.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on: create
55
jobs:
66
TAG_PUSH:
77
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
10+
id-token: write
811
if: github.event.ref_type == 'tag'
912
steps:
1013
- uses: actions/checkout@v4
@@ -24,12 +27,14 @@ jobs:
2427
env:
2528
MINI_APP_ID: ${{ secrets.TDESIGN_APP_ID }}
2629
MINI_APP_PRIVATE_KEY: ${{ secrets.TDESIGN_MINI_KEY }}
30+
31+
- run: sudo npm install -g npm@latest
32+
2733
- id: publish
2834
name: publish NPM
2935
uses: JS-DevTools/npm-publish@v4
3036
with:
3137
package: packages/tdesign-miniprogram
32-
token: ${{ secrets.TDESIGN_NPM_TOKEN }}
3338
tag: ${{ contains(github.ref_name, 'beta') && 'beta' || 'latest' }}
3439
- if: steps.publish.outputs.type != 'none'
3540
run: |

packages/tdesign-miniprogram/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
"miniprogram_dist",
1414
"CHANGELOG.md"
1515
],
16+
"publishConfig": {
17+
"registry": "https://registry.npmjs.org/"
18+
},
1619
"repository": {
1720
"type": "git",
1821
"url": "https://github.com/Tencent/tdesign-miniprogram"
@@ -24,4 +27,4 @@
2427
"author": "tdesign",
2528
"license": "MIT",
2629
"devDependencies": {}
27-
}
30+
}

0 commit comments

Comments
 (0)