From e14dc87de76329f7959109293015618819b8e6d4 Mon Sep 17 00:00:00 2001 From: Bradley Xu Date: Mon, 18 Nov 2024 14:21:53 +0800 Subject: [PATCH] chore: should check changeset files exists before run snapshot release (#7023) --- .github/workflows/{pr-temp.yml => canary.yml} | 13 +++++++++---- .github/workflows/version.yml | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) rename .github/workflows/{pr-temp.yml => canary.yml} (78%) diff --git a/.github/workflows/pr-temp.yml b/.github/workflows/canary.yml similarity index 78% rename from .github/workflows/pr-temp.yml rename to .github/workflows/canary.yml index 5ba5cdf1e6..0b0025c642 100644 --- a/.github/workflows/pr-temp.yml +++ b/.github/workflows/canary.yml @@ -1,11 +1,13 @@ -name: PR Release +name: Publish canary on: - pull_request: + push: + branches: + - release/** jobs: - release: - name: Release + canary: + name: Canary runs-on: ubuntu-latest strategy: @@ -28,6 +30,9 @@ jobs: - name: Setup run: pnpm run setup + - name: Check changeset exists + run: test "$(ls -1 .changeset | wc -l)" -gt "2" + - name: Config npm run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc env: diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml index dbd231c9b6..640402c4c3 100644 --- a/.github/workflows/version.yml +++ b/.github/workflows/version.yml @@ -3,7 +3,7 @@ name: Version on: push: branches: - - release/** + - release/next jobs: version: