From 7cdda6b92ad9089ae246e486f21fe581bae97c53 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 20 Aug 2024 11:36:13 +0800 Subject: [PATCH] ci: add pkg.pr.new --- .github/workflows/pkg.pr.new.yml | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/pkg.pr.new.yml diff --git a/.github/workflows/pkg.pr.new.yml b/.github/workflows/pkg.pr.new.yml new file mode 100644 index 0000000..64033c1 --- /dev/null +++ b/.github/workflows/pkg.pr.new.yml @@ -0,0 +1,39 @@ +name: Publish Any Commit + +on: + pull_request: + push: + branches: + - '**' + tags: + - '!**' + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [20] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set node ${{ matrix.node_version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: pnpm + + - run: corepack enable + + - name: Install + run: pnpm install + + - name: Build + run: pnpm build + + - name: Release + run: pnpx pkg-pr-new publish --compact --pnpm './packages/*'