From 1a4a71f93a7fa10f37fbc55174eb5c44a88986af Mon Sep 17 00:00:00 2001 From: Lost Paul <70213368+LostPaul@users.noreply.github.com> Date: Tue, 17 Sep 2024 14:13:16 +0200 Subject: [PATCH] Update beta-release.yaml --- .github/workflows/beta-release.yaml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/beta-release.yaml b/.github/workflows/beta-release.yaml index a9e2cb9..6e3b786 100644 --- a/.github/workflows/beta-release.yaml +++ b/.github/workflows/beta-release.yaml @@ -30,13 +30,13 @@ jobs: RELEASE_VERSION=${VERSION%-beta} echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV - - name: Update manifest-beta.json + - name: Update manifest-beta.json in current branch run: | VERSION=${{ env.VERSION }} jq --arg version "$VERSION" '.version = $version' manifest-beta.json > manifest-beta-temp.json mv manifest-beta-temp.json manifest-beta.json - - name: Commit and push changes + - name: Commit and push changes in current branch run: | git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" @@ -44,6 +44,25 @@ jobs: git commit -m "Update manifest-beta.json to version $VERSION" git push origin ${{ github.ref_name }} + - name: Switch to main branch + run: | + git checkout main + git pull origin main + + - name: Update manifest-beta.json in main branch + run: | + VERSION=${{ env.VERSION }} + jq --arg version "$VERSION" '.version = $version' manifest-beta.json > manifest-beta-temp.json + mv manifest-beta-temp.json manifest-beta.json + + - name: Commit and push changes in main branch + run: | + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git add manifest-beta.json + git commit -m "Update manifest-beta.json to version $VERSION in main branch" + git push origin main + - name: npm build run: | npm install