Skip to content

Commit 298877d

Browse files
authored
Update version of Gemfile.lock in publish workflow automatically (#584)
fix #583 Sorry for repeating myself. Fix #582 was a misunderstanding, when dynamically rewriting the version, only gemspec versioned up the `line-bot-api` gem, but left the `Gemfile.lock` unchanged, causing the version mismatch.
1 parent ed97a23 commit 298877d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ jobs:
2424
with:
2525
bundler-cache: true
2626
ruby-version: 3.3
27-
- run: bundle install --deployment
2827
- name: Update version file with the release version
2928
run: |
3029
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
@@ -36,14 +35,15 @@ jobs:
3635
echo "VERSION=$VERSION" >> $GITHUB_ENV
3736
3837
sed -i "s/VERSION = \".*\"/VERSION = \"$VERSION\"/" lib/line/bot/version.rb
38+
sed -i "s/line-bot-api (.*)/line-bot-api ($VERSION)/" Gemfile.lock
3939
4040
cat lib/line/bot/version.rb
4141
4242
# commit
4343
git config user.name github-actions
4444
git config user.email github-actions@github.com
4545
46-
git add lib/line/bot/version.rb
46+
git add lib/line/bot/version.rb Gemfile.lock
4747
git commit -m "Set version to $VERSION"
4848
- uses: rubygems/release-gem@a25424ba2ba8b387abc8ef40807c2c85b96cbe32 # v1.1.1
4949

0 commit comments

Comments
 (0)