From 802b0f8bbf72f983cae5064363651b86a95547ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Thu, 22 Aug 2024 20:16:34 +0800 Subject: [PATCH] ci: continuous release --- .github/workflows/release-continuous.yml | 24 ++++++++++++++++++++++++ .github/workflows/release.yml | 3 +-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release-continuous.yml diff --git a/.github/workflows/release-continuous.yml b/.github/workflows/release-continuous.yml new file mode 100644 index 00000000..b04a181f --- /dev/null +++ b/.github/workflows/release-continuous.yml @@ -0,0 +1,24 @@ +name: Publish Any Commit +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - run: corepack enable + - uses: actions/setup-node@v4 + with: + node-version: lts/* + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm build + + - run: pnpx pkg-pr-new publish diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 751a497e..8046c289 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,8 +17,7 @@ jobs: with: fetch-depth: 0 - - name: Install pnpm - uses: pnpm/action-setup@v2 + - run: corepack enable - name: Set node uses: actions/setup-node@v4