From 7c58eb24dad21bb6ac80c86da212f6dbca721149 Mon Sep 17 00:00:00 2001 From: zbynekstara Date: Fri, 21 Aug 2026 11:47:44 +0200 Subject: [PATCH 1/2] chore: update prod branch on successful release --- .github/workflows/release.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 378eea8842..64c9092b71 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,8 +8,8 @@ # PR titled "Version Packages". # * `publish` - the release PR has been merged, so the versions in `master` # are ahead of what is on npm. The workflow builds the workspace, publishes -# every changed public package, and creates a git tag + GitHub Release per -# published package. +# every changed public package, creates a git tag + GitHub Release per +# published package, and finally resets `prod` to the released commit. # # Nothing is published until the release PR is merged by a maintainer. # @@ -153,3 +153,9 @@ jobs: env: YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # No `NODE_AUTH_TOKEN` on purpose (must use Yarn) + + # Mirror the released commit onto `prod`. + - name: Update `prod` branch + id: update-prod + if: ${{ steps.publish-packages.outputs.published == 'true' }} + run: git push --force origin HEAD:refs/heads/prod From d413369f9d66966604029344f788f351b53db94e Mon Sep 17 00:00:00 2001 From: zbynekstara Date: Fri, 21 Aug 2026 12:37:17 +0200 Subject: [PATCH 2/2] fix --- .github/workflows/release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 64c9092b71..4cc23fa7ca 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -158,4 +158,8 @@ jobs: - name: Update `prod` branch id: update-prod if: ${{ steps.publish-packages.outputs.published == 'true' }} - run: git push --force origin HEAD:refs/heads/prod + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh api -X PATCH "repos/${{ github.repository }}/git/refs/heads/prod" \ + -f sha='${{ github.sha }}' -F force=true