From 1ed1a4e25a07b849e8c5a83142b1aece5ca41c99 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 31 Oct 2023 14:06:55 +0000 Subject: [PATCH] Release prep script for cutting branches (#26392) --- .github/workflows/release_prepare.yml | 81 +++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 .github/workflows/release_prepare.yml diff --git a/.github/workflows/release_prepare.yml b/.github/workflows/release_prepare.yml new file mode 100644 index 0000000000..2e962e43ec --- /dev/null +++ b/.github/workflows/release_prepare.yml @@ -0,0 +1,81 @@ +name: Cut branches +on: + workflow_dispatch: + inputs: + element-desktop: + description: Prepare element-desktop + required: true + type: boolean + default: true + element-web: + description: Prepare element-web + required: true + type: boolean + default: true + matrix-react-sdk: + description: Prepare matrix-react-sdk + required: true + type: boolean + default: true + matrix-js-sdk: + description: Prepare matrix-js-sdk + required: true + type: boolean + default: true +jobs: + prepare: + runs-on: ubuntu-latest + steps: + - name: Checkout Element Desktop + uses: actions/checkout@v4 + if: inputs.element-desktop + with: + repository: vector-im/element-desktop + path: element-desktop + ref: staging + fetch-depth: 0 + fetch-tags: true + token: ${{ secrets.ELEMENT_BOT_TOKEN }} + - name: Checkout Element Web + uses: actions/checkout@v4 + if: inputs.element-web + with: + repository: vector-im/element-web + path: element-web + ref: staging + fetch-depth: 0 + fetch-tags: true + token: ${{ secrets.ELEMENT_BOT_TOKEN }} + - name: Checkout Matrix React SDK + uses: actions/checkout@v4 + if: inputs.matrix-react-sdk + with: + repository: matrix-org/matrix-react-sdk + path: matrix-react-sdk + ref: staging + fetch-depth: 0 + fetch-tags: true + token: ${{ secrets.ELEMENT_BOT_TOKEN }} + - name: Checkout Matrix JS SDK + uses: actions/checkout@v4 + if: inputs.matrix-js-sdk + with: + repository: matrix-org/matrix-js-sdk + path: matrix-js-sdk + ref: staging + fetch-depth: 0 + fetch-tags: true + token: ${{ secrets.ELEMENT_BOT_TOKEN }} + + - name: Resolve repos + run: | + echo "REPOS=$(ls .)" >> $GITHUB_ENV + + - name: Merge develop + run: | + git config --global user.email "releases@riot.im" + git config --global user.name "RiotRobot" + for REPO in $REPOS; do git -C "$REPO" merge origin/develop; done + + - name: Push staging + run: for REPO in $REPOS; do git -C "$REPO" push origin staging; done