From 50c1c6b437aeb7f241abc97f51e0c9525a7238a2 Mon Sep 17 00:00:00 2001 From: ModStart Date: Mon, 16 Dec 2024 17:56:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=EF=BC=9Asdk=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sdk/.github/workflows/tag-release.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sdk/.github/workflows/tag-release.yml diff --git a/sdk/.github/workflows/tag-release.yml b/sdk/.github/workflows/tag-release.yml new file mode 100644 index 0000000..e932cd9 --- /dev/null +++ b/sdk/.github/workflows/tag-release.yml @@ -0,0 +1,22 @@ +name: Publish to npm + +on: + push: + tags: + - 'v*.*.*' # 仅当推送匹配 vX.X.X 的标签时触发 + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Authenticate to npm + run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish package + run: npm publish --access public