From af72aaaa02d2f0f464d22cab9547e09acfc2aa34 Mon Sep 17 00:00:00 2001 From: Drew Smirnoff Date: Fri, 15 May 2026 21:36:03 +0400 Subject: [PATCH] ci: nixpkgs-bump staging sync (#1294) --- .github/workflows/nixpkgs-bump.yml | 38 +++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/.github/workflows/nixpkgs-bump.yml b/.github/workflows/nixpkgs-bump.yml index 0682d55de995e05de72ad5a2e97fd8066031d38b..b56fdbca61cc86f3ceb2d6d73d93684a44d66fa4 100644 --- a/.github/workflows/nixpkgs-bump.yml +++ b/.github/workflows/nixpkgs-bump.yml @@ -58,27 +58,19 @@ jobs: path: nixpkgs fetch-depth: 0 - - name: Sync fork with upstream master + - name: Sync fork with upstream master and fetch staging if: steps.ver.outputs.skip != 'true' working-directory: nixpkgs run: | git config user.name "Floatpane Bot" git config user.email "us@floatpane.com" git remote add upstream https://github.com/NixOS/nixpkgs.git - git fetch upstream master + git fetch upstream master staging git checkout master git reset --hard upstream/master git push origin master --force-with-lease - - name: Create bump branch - if: steps.ver.outputs.skip != 'true' - working-directory: nixpkgs - run: | - BRANCH="matcha-${{ steps.ver.outputs.version }}" - git checkout -b "$BRANCH" - echo "BRANCH=$BRANCH" >> $GITHUB_ENV - - - name: Get current version + - name: Get current version (from master) if: steps.ver.outputs.skip != 'true' id: current working-directory: nixpkgs @@ -87,6 +79,19 @@ jobs: OLD=$(grep -E '^\s*version\s*=\s*"' "$PKG" | head -1 | sed -E 's/.*"([^"]+)".*/\1/') echo "old=$OLD" >> $GITHUB_OUTPUT + - name: Checkout staging for build verification + if: steps.ver.outputs.skip != 'true' + working-directory: nixpkgs + run: | + # Build against staging (has newer go) — final PR branch is rebased onto master later. + git checkout -B build-staging upstream/staging + + - name: Set bump branch name + if: steps.ver.outputs.skip != 'true' + run: | + BRANCH="matcha-${{ steps.ver.outputs.version }}" + echo "BRANCH=$BRANCH" >> $GITHUB_ENV + - name: Bump version and reset hashes if: steps.ver.outputs.skip != 'true' working-directory: nixpkgs @@ -134,6 +139,17 @@ jobs: working-directory: nixpkgs run: nix-build -A matcha --no-out-link + - name: Move final package.nix onto master-based bump branch + if: steps.ver.outputs.skip != 'true' + working-directory: nixpkgs + run: | + PKG=pkgs/by-name/ma/matcha/package.nix + cp "$PKG" /tmp/package.nix.new + git checkout -- "$PKG" + git checkout master + git checkout -B "$BRANCH" + cp /tmp/package.nix.new "$PKG" + - name: Commit and push if: steps.ver.outputs.skip != 'true' working-directory: nixpkgs