From f8ef94df518a9750aae53482f93e6b4a75e5d88e Mon Sep 17 00:00:00 2001 From: Ethan Li Date: Sun, 23 Jun 2024 15:27:26 -0700 Subject: [PATCH] Add CI workflows to auto-update `beta` & `stable` branches on tag push --- .github/workflows/release-channel-beta.yml | 26 +++++++++++ .github/workflows/release-channel-stable.yml | 45 ++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 .github/workflows/release-channel-beta.yml create mode 100644 .github/workflows/release-channel-stable.yml diff --git a/.github/workflows/release-channel-beta.yml b/.github/workflows/release-channel-beta.yml new file mode 100644 index 0000000..445b95a --- /dev/null +++ b/.github/workflows/release-channel-beta.yml @@ -0,0 +1,26 @@ +--- +name: release-channel-beta +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+-beta.*' + +jobs: + ff-branch-beta: + runs-on: ubuntu-latest + strategy: + fail-fast: false + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - run: | + git checkout beta + git merge --ff-only ${{ github.ref_name }} + + - uses: ad-m/github-push-action@v0.8.0 + with: + branch: beta diff --git a/.github/workflows/release-channel-stable.yml b/.github/workflows/release-channel-stable.yml new file mode 100644 index 0000000..771a49f --- /dev/null +++ b/.github/workflows/release-channel-stable.yml @@ -0,0 +1,45 @@ +--- +name: release-channel-stable +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' + +jobs: + ff-branch-beta: + runs-on: ubuntu-latest + strategy: + fail-fast: false + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - run: | + git checkout beta + git merge --ff-only ${{ github.ref_name }} + + - uses: ad-m/github-push-action@v0.8.0 + with: + branch: beta + + ff-branch-stable: + runs-on: ubuntu-latest + strategy: + fail-fast: false + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - run: | + git checkout stable + git merge --ff-only ${{ github.ref_name }} + + - uses: ad-m/github-push-action@v0.8.0 + with: + branch: stable