From c571b19b0fc899bc0cd282a462da6c36cbeddfb2 Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Sat, 20 Feb 2021 00:02:41 +0800 Subject: [PATCH] add npm-publish --- .github/workflows/npm-publish.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 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..1c9c86f --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,25 @@ +name: npm-publish +on: + push: + branches: + - main +jobs: + npm-publish: + name: npm-publish + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@master + - name: Set up Node.js + uses: actions/setup-node@master + with: + node-version: 10.0.0 + - name: Publish + uses: MHuiG/npm-publish-action@master + with: + tag_name: "%s" + tag_message: "%s" + commit_pattern: "^release\\:\ (.*)" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_AUTH_TOKEN: ${{ secrets.npm_token }}