From 934baf98e2c672a297346460dfd30451c63680f5 Mon Sep 17 00:00:00 2001 From: Mimi <1119186082@qq.com> Date: Tue, 15 Apr 2025 14:08:05 +0800 Subject: [PATCH] New Action: Publish to npm --- .github/workflows/npm-publish.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..6291960 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,22 @@ +name: Publish to npm + +on: + push: + tags: + - 'v*' + +jobs: + npm-publish: + runs-on: ubuntu-latest + permissions: + contents: write + id-token: write + steps: + - uses: actions/checkout@v4 + - name: Use Node.js + uses: actions/setup-node@v4 + - run: | + npm install + npm publish --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}