ci: リリース CI のタグによる実行条件を latest
に変更
#212
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of Change:
CI の修正
Cause of the Problem (問題の原因)
v*.*.*
の形式のタグを push する場合でも CI が動作するようにしていたが, この場合に CI でもタグを作成しようとしてしまうためリリースに失敗していた.Dealing with Problems (問題への対処)
semantic-release
の設定を変更して, 手動作成したタグをそのまま利用してリリースできるようにすることを考えた. しかし, この場合だと間違ったバージョンのタグを作成した場合に混乱が生じる. それだけでなく, 正しいバージョンのタグを発行する手間が生じる.Details of implementation (実施内容)
latest
タグをpush
したときに実行するように条件を変更した. これにより, どの場合でもsemantic-release
によって正しいバージョンのタグとリリースが生成される.Additional Information (追加情報)
この方法では,
latest
タグが既に存在している場合に以下の手順で上書きしなければならない.git tag -f latest
git push -f origin latest