From e706119f14541ee7af2c6ac05aad30f2e7854d9a Mon Sep 17 00:00:00 2001 From: Niall Thomson Date: Fri, 14 Jun 2024 17:59:19 -0600 Subject: [PATCH] Create snapshot branch as part of release --- .github/workflows/release.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c612e7d60..65e558f61 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -14,6 +14,8 @@ jobs: - name: Check out code uses: actions/checkout@v4 with: + fetch-depth: 0 + fetch-tags: true submodules: recursive - name: Use Node.js uses: actions/setup-node@v4 @@ -33,8 +35,12 @@ jobs: git config user.email 'github-actions[bot]@users.noreply.github.com' - name: Update stable branch run: | - git fetch --unshallow git checkout stable git pull git merge --no-ff main -m "Publish to stable" git push + - name: Create snapshot + run: | + suffix=$(git rev-parse --short HEAD) + git checkout -b snapshot-${suffix} + git push origin snapshot-${suffix}