From 8894683cb5369d53fe313b32c31aac3a3be1af07 Mon Sep 17 00:00:00 2001 From: Florian Meyer Date: Sun, 9 Aug 2026 06:40:15 +0200 Subject: [PATCH 1/3] ci: build cot-cli binaries for releases --- .github/workflows/release-binaries.yml | 53 ++++++++++++++++++++++++++ .gitignore | 3 ++ cot-cli/Cargo.toml | 4 ++ 3 files changed, 60 insertions(+) create mode 100644 .github/workflows/release-binaries.yml diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml new file mode 100644 index 000000000..e1348f796 --- /dev/null +++ b/.github/workflows/release-binaries.yml @@ -0,0 +1,53 @@ +name: Release binaries + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + upload-cot-cli: + if: startsWith(github.event.release.tag_name, 'cot-cli-v') + name: Upload cot-cli (${{ matrix.target }}) + strategy: + fail-fast: false + matrix: + include: + - target: x86_64-unknown-linux-gnu + os: ubuntu-latest + - target: aarch64-unknown-linux-gnu + os: ubuntu-latest + - target: x86_64-apple-darwin + os: macos-latest + - target: aarch64-apple-darwin + os: macos-latest + - target: x86_64-pc-windows-msvc + os: windows-latest + - target: aarch64-pc-windows-msvc + os: windows-latest + runs-on: ${{ matrix.os }} + permissions: + contents: write + steps: + - name: Checkout source + uses: actions/checkout@v7 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + + - name: Install cross + if: matrix.target == 'aarch64-unknown-linux-gnu' + uses: taiki-e/install-action@v2.85.4 + with: + tool: cross + + - name: Build and upload cot-cli + uses: taiki-e/upload-rust-binary-action@v1.30.2 + with: + bin: cot + package: cot-cli + target: ${{ matrix.target }} + archive: cot-cli-$target + locked: true diff --git a/.gitignore b/.gitignore index a611abcd7..d29c26fb3 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,9 @@ target/ # MSVC Windows builds of rustc generate these, which store debugging information *.pdb +# macOS metadata +.DS_Store + # Test databases *.db *.sqlite3 diff --git a/cot-cli/Cargo.toml b/cot-cli/Cargo.toml index 341b564bd..6fd82f04e 100644 --- a/cot-cli/Cargo.toml +++ b/cot-cli/Cargo.toml @@ -16,6 +16,10 @@ authors.workspace = true name = "cot" path = "src/main.rs" +[package.metadata.binstall] +pkg-url = "{ repo }/releases/download/{ name }-v{ version }/{ name }-{ target }{ archive-suffix }" +bin-dir = "{ bin }{ binary-ext }" + [lints] workspace = true From 8734f69780bb6c4a22ac63e6e6f3ceae81bd9696 Mon Sep 17 00:00:00 2001 From: Florian Meyer Date: Sun, 9 Aug 2026 17:51:16 +0200 Subject: [PATCH 2/3] Remove unrelated .DS_Store ignore rule --- .gitignore | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitignore b/.gitignore index d29c26fb3..a611abcd7 100644 --- a/.gitignore +++ b/.gitignore @@ -9,9 +9,6 @@ target/ # MSVC Windows builds of rustc generate these, which store debugging information *.pdb -# macOS metadata -.DS_Store - # Test databases *.db *.sqlite3 From 898a1598bfdb0139dd8f1a88fc106a44d0783f92 Mon Sep 17 00:00:00 2001 From: Florian Meyer Date: Mon, 10 Aug 2026 22:36:23 +0200 Subject: [PATCH 3/3] ci: address release artifact review --- .github/workflows/release-binaries.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml index e1348f796..c1d16c7e0 100644 --- a/.github/workflows/release-binaries.yml +++ b/.github/workflows/release-binaries.yml @@ -2,7 +2,7 @@ name: Release binaries on: release: - types: [published] + types: [created] permissions: contents: read @@ -50,4 +50,6 @@ jobs: package: cot-cli target: ${{ matrix.target }} archive: cot-cli-$target + include: LICENSE-APACHE,LICENSE-MIT + checksum: sha256 locked: true