Skip to content

CI: 修正 publish 時 rake release 判定有未提交檔案 - #51

Merged
adz624 merged 1 commit into
masterfrom
ci/fix-publish-guard-clean
Oct 23, 2026
Merged

adz624 merged 1 commit into
masterfrom
ci/fix-publish-guard-clean

Conversation

@sensui624

Copy link
Copy Markdown
Contributor

第一次發佈 4.0.2 的 run(https://github.com/superlanding/super_tools/actions/runs/39903868151 )在 rake release 失敗:There are files that need to be committed first.

原因:ruby/setup-ruby 的 bundler-cache 會把 BUNDLE_PATH 等設定寫進 gemfiles/.bundle/config,而這個檔案有被 git 追蹤,所以 guard_clean 判定工作目錄不乾淨。

修法:publish job 在 release 前加一步,把 gemfiles/.bundle/config 標成 assume-unchanged(只影響這次 CI 的 checkout,不改 repo 內容、不改 gem 內容)。前後各印一次 git status --porcelain 方便確認。

當時 4.0.2 沒有發佈出去,也沒有打 tag。這張合進 master 後會重新跑,會再停在 gem-publish 等核准。

@adz624
adz624 merged commit b160c6a into master Oct 23, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants