From d86d9a4c3fd919be672ed98b7548cf767612df82 Mon Sep 17 00:00:00 2001 From: frinsdev <46485646+frinsdev@users.noreply.github.com> Date: Sun, 19 Jul 2026 14:00:13 +0800 Subject: [PATCH] ci: refresh Gemfile.lock after tag version bump --- .github/workflows/release.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 056c023..fa551b5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,6 +33,9 @@ jobs: ruby-version: '4.0' bundler-cache: true + - name: Run specs + run: bundle exec rake spec + - name: Set version from tag id: version run: | @@ -52,17 +55,17 @@ jobs: File.write(path, updated) ' "$version" + # Path gem version is recorded in Gemfile.lock; refresh it after the bump. + BUNDLE_FROZEN=false bundle lock + echo "version=$version" >> "$GITHUB_OUTPUT" echo "Releasing semaphore-sms-ruby ${version} from tag ${GITHUB_REF_NAME}" - - name: Run specs - run: bundle exec rake spec - - name: Commit version for release build run: | git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git add lib/semaphore_sms/version.rb + git add lib/semaphore_sms/version.rb Gemfile.lock git diff --cached --quiet || git commit -m "chore: bump version to ${{ steps.version.outputs.version }}" - name: Push gem to RubyGems.org @@ -86,7 +89,9 @@ jobs: File.write(path, updated) ' "$VERSION" - git add lib/semaphore_sms/version.rb + BUNDLE_FROZEN=false bundle lock + + git add lib/semaphore_sms/version.rb Gemfile.lock if git diff --cached --quiet; then echo "main already at ${VERSION}" exit 0