From bcdfb16ce14e089c15e2043521f189eaac4fc041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E8=B6=85=E8=B6=8A?= <993921@qq.com> Date: Sat, 16 Mar 2024 16:17:28 +0800 Subject: [PATCH] semi-auto deploy npm package --- .github/workflows/deploy-alpha.yml | 19 +++++++++++++++++++ .github/workflows/deploy.yml | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .github/workflows/deploy-alpha.yml create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy-alpha.yml b/.github/workflows/deploy-alpha.yml new file mode 100644 index 0000000..16334eb --- /dev/null +++ b/.github/workflows/deploy-alpha.yml @@ -0,0 +1,19 @@ +name: Publish Package to npmjs + +on: + push: + branches-ignore: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '18.x' + registry-url: 'https://registry.npmjs.org' + - run: npm ci + - run: npm publish --access public --tag alpha + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..bcd4e1f --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,19 @@ +name: Publish Package to npmjs + +on: + push: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '18.x' + registry-url: 'https://registry.npmjs.org' + - run: npm ci + - run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file