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