From 9701c401097a25a825c2cd4850afd5040a53fcc0 Mon Sep 17 00:00:00 2001 From: Saadi Myftija Date: Wed, 3 Dec 2025 14:45:21 +0100 Subject: [PATCH 1/3] chore(releases): automatically update the lockfile in changeset PRs This is a step which we currently need to do manually and it's rather painful. The lockfile update is necessary due to cross references in our packages. Added it as a separate job instead of a step to start from fresh workspace, as the state that the `changeset` step leaves the workdir is not explicitly clear to the reader. --- .github/workflows/release.yml | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4f8ac60495..4cefafe066 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -94,3 +94,41 @@ jobs: VERSION=$(git show origin/changeset-release/main:packages/cli-v3/package.json | jq -r '.version') gh pr edit "$PR_NUMBER" --title "chore: release v$VERSION" fi + + update-lockfile: + name: Update lockfile on release PR + runs-on: ubuntu-latest + needs: release + if: needs.release.outputs.published != 'true' + permissions: + contents: write + steps: + - name: Checkout release branch + uses: actions/checkout@v4 + with: + ref: changeset-release/main + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 10.23.0 + + - name: Setup node + uses: buildjet/setup-node@v4 + with: + node-version: 20.19.0 + + - name: Install and update lockfile + run: pnpm install + + - name: Commit and push lockfile + run: | + if git diff --quiet pnpm-lock.yaml; then + echo "No lockfile changes" + else + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add pnpm-lock.yaml + git commit -m "chore: update lockfile for release" + git push + fi From 884b1c09d7547a9c2ab057f413bdb7945a16ef33 Mon Sep 17 00:00:00 2001 From: Saadi Myftija Date: Wed, 3 Dec 2025 15:27:47 +0100 Subject: [PATCH 2/3] Name the branch explicitly when pushing --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4cefafe066..4e853645fd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -123,6 +123,7 @@ jobs: - name: Commit and push lockfile run: | + set -e if git diff --quiet pnpm-lock.yaml; then echo "No lockfile changes" else @@ -130,5 +131,5 @@ jobs: git config user.email "github-actions[bot]@users.noreply.github.com" git add pnpm-lock.yaml git commit -m "chore: update lockfile for release" - git push + git push origin changeset-release/main fi From da5e2ab684fe92bc856e26a38e84f622909adde8 Mon Sep 17 00:00:00 2001 From: Saadi Myftija Date: Wed, 3 Dec 2025 15:35:29 +0100 Subject: [PATCH 3/3] Push docker tag on successful package release --- .github/workflows/release.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4e853645fd..e57def57e6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -82,6 +82,14 @@ jobs: package_version=$(echo '${{ steps.changesets.outputs.publishedPackages }}' | jq -r '.[0].version') echo "package_version=${package_version}" >> "$GITHUB_OUTPUT" + # this triggers the publish workflow for the docker images + - name: 🏷️ Create and push docker tag + if: steps.changesets.outputs.published == 'true' + run: | + set -e + git tag "v.docker.${{ steps.get_version.outputs.package_version }}" + git push origin "v.docker.${{ steps.get_version.outputs.package_version }}" + - name: Update PR title with version if: steps.changesets.outputs.published != 'true' env: