リリース用アーカイブ生成と GitHub Actions による公開#15
Merged
Merged
Conversation
make package で全プラットフォーム分のクロスコンパイル済みバイナリを deadman.conf・README・LICENSE と同梱し、linux/darwin は .tar.gz、 windows は .zip に固める。アーカイブ名のみバージョンを持ち、中の実行 ファイルは常に素の deadman / deadman.exe とする。SOURCE_DATE_EPOCH と GNU tar の正規化・gzip -n で決定的アーカイブとし、SHA256SUMS を生成する。 zip の変数は ZIP_BIN とし呼び出し時に ZIP=/ZIPOPT= をクリアする (Info-ZIP の zip は環境変数 $ZIP/$ZIPOPT を既定オプションとして読み、 ZIP という変数名を export すると引数解釈が壊れて出力が作られないため)。 タグ push (v*) で release.yml が make package を呼び全プラットフォームを ビルドして GitHub Release へ公開する(fetch-depth:0 でタグ解決、最小権限、 リリースノートは push 時のみ自動生成)。README にリリース版バイナリの インストール手順を追記。
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ceed8f64bb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Makefile: アーカイブ生成の `tar | gzip` パイプを中間ファイル化。dash は pipefail 非対応でパイプの終了ステータスが gzip 由来になり、tar 失敗時に 破損 .tar.gz を「成功」として公開しうる問題を修正(各コマンドの status を伝播)。 - release.yml: 同一コミットに複数タグがある場合に git describe が tag_name と 別タグを拾わないよう、公開タグを make package へ VERSION として明示的に渡す。 - release.yml: setup-go のコメントを実態に合わせて修正(go-version-file は go.mod の パッチに固定され、check-latest はそのバージョンの確実な取得でありパッチ追従ではない)。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
概要
リリース配布の仕組みを追加する。
make packageでクロスコンパイル済みの配布アーカイブを生成し、v*タグの push で GitHub Actions が全プラットフォーム分をビルドして GitHub Release へ公開する。変更点
make package(Makefile)linux/amd64,arm64darwin/amd64,arm64windows/amd64,arm64deadman/deadman.exe、バージョンは入れない)+deadman.conf+README.md+LICENSEdeadman-<version>-<os>-<arch>形式のアーカイブ(linux/macOS は.tar.gz、Windows は.zip)+ 全体のSHA256SUMS-X main.version=$(git describe --tags …)で TUI タイトルに反映。タグが無い/作業ツリーが汚れている/タグから先行している場合は警告SOURCE_DATE_EPOCH(コミット日時)で tar の mtime を正規化、gzip -n、zip は mtime をtouchで固定しTZ=UTCで DOS タイムスタンプを固定。dateが epoch を扱えない環境でも決定性を失わないフォールバック付きzipの事前チェック、sha256sum/shasumフォールバック。Info-ZIP の$ZIP/$ZIPOPT汚染を避けるため make 変数はZIP_BIN、呼び出し時に環境変数をクリアリリースワークフロー(
.github/workflows/release.yml)v*タグ push、またはworkflow_dispatch(既存タグの再公開)contents: read、リリースジョブのみcontents: writefetch-depth: 0(git describeのタグ解決とSOURCE_DATE_EPOCHに全履歴が必要)make testでテストゲート、concurrencyで同一タグの多重実行を直列化make packageが唯一の情報源(ビルド・アーカイブ・チェックサム)README
SHA256SUMS検証手順)検証
make checkグリーン(lint 0 issues・tidy-check クリーン・全テスト pass)make packageを 2 回実行し、全 6 アーカイブ(.tar.gz/.zip)がバイト単位で一致(決定的ビルドを確認)sha256sum -cの通過を確認/code-review(多角的 + 敵対的検証)で洗い出した指摘を反映済み