From f53f58d2978d082038cfde5959d9e6431663154b Mon Sep 17 00:00:00 2001 From: donniean <12584040+donniean@users.noreply.github.com> Date: Mon, 15 Jul 2024 13:29:49 +0800 Subject: [PATCH] ci: delete branch after release canary or next (#26) Signed-off-by: donniean --- .github/workflows/release-canary.yml | 6 ++++++ .github/workflows/release-next.yml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/release-canary.yml b/.github/workflows/release-canary.yml index 9cb7b85..741bcd5 100644 --- a/.github/workflows/release-canary.yml +++ b/.github/workflows/release-canary.yml @@ -43,3 +43,9 @@ jobs: - name: Publish run: yarn changeset publish --no-git-tag --tag canary + + - name: Delete Branch + if: contains(github.ref, 'canary') + run: | + branch=${GITHUB_REF#refs/heads/} + git push origin --delete $branch diff --git a/.github/workflows/release-next.yml b/.github/workflows/release-next.yml index 7576f70..daa0b4b 100644 --- a/.github/workflows/release-next.yml +++ b/.github/workflows/release-next.yml @@ -43,3 +43,9 @@ jobs: - name: Publish run: yarn changeset publish --no-git-tag --tag next + + - name: Delete Branch + if: contains(github.ref, 'next') + run: | + branch=${GITHUB_REF#refs/heads/} + git push origin --delete $branch