Skip to content

Commit bf1331e

Browse files
committed
ci: add release + CI pipelines; ship platform binaries (v0.3.3)
The repo had no .github/workflows, so v0.3.1/v0.3.2 were tagged with zero release assets — 'animus plugin install launchapp-dev/animus-queue-default@vX' failed with 'no release asset matched platform' and the plugin could only be path-installed from a local build. Port the working release pipeline from animus-subject-default (build x86_64/aarch64 linux + darwin, cosign-sign, publish via softprops/action-gh-release) plus the fmt/clippy/test CI. No functional code change from v0.3.2.
1 parent 6499115 commit bf1331e

4 files changed

Lines changed: 106 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
RUST_BACKTRACE: 1
12+
13+
jobs:
14+
test:
15+
name: Test (${{ matrix.os }})
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os: [ubuntu-latest, macos-latest]
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: dtolnay/rust-toolchain@stable
24+
with:
25+
components: rustfmt, clippy
26+
- uses: Swatinem/rust-cache@v2
27+
- run: cargo fmt --all -- --check
28+
- run: cargo clippy --all-targets -- -D warnings
29+
- run: cargo test --all-features
30+
- run: cargo build --release

.github/workflows/release.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
id-token: write
11+
12+
env:
13+
# GitHub Actions runner Node 20 -> Node 24 deprecation (effective 2026-06-02).
14+
# Forces JS-based actions onto Node 24 ahead of the cutover.
15+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
16+
17+
jobs:
18+
build:
19+
name: build ${{ matrix.target }}
20+
runs-on: ${{ matrix.os }}
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
include:
25+
- os: ubuntu-latest
26+
target: x86_64-unknown-linux-gnu
27+
archive: tar.gz
28+
- os: ubuntu-latest
29+
target: aarch64-unknown-linux-gnu
30+
archive: tar.gz
31+
cross: true
32+
- os: macos-latest
33+
target: x86_64-apple-darwin
34+
archive: tar.gz
35+
- os: macos-latest
36+
target: aarch64-apple-darwin
37+
archive: tar.gz
38+
steps:
39+
- uses: actions/checkout@v4
40+
- uses: dtolnay/rust-toolchain@stable
41+
with:
42+
targets: ${{ matrix.target }}
43+
- uses: Swatinem/rust-cache@v2
44+
- name: install cross
45+
if: matrix.cross
46+
run: cargo install cross --git https://github.com/cross-rs/cross --locked
47+
- name: build (cross)
48+
if: matrix.cross
49+
run: cross build --release --target ${{ matrix.target }}
50+
- name: build (native)
51+
if: '!matrix.cross'
52+
run: cargo build --release --target ${{ matrix.target }}
53+
- name: package
54+
run: |
55+
mkdir -p dist
56+
BIN=animus-queue-default
57+
ARCHIVE="${BIN}-${{ matrix.target }}.tar.gz"
58+
tar -C target/${{ matrix.target }}/release -czf "dist/${ARCHIVE}" "${BIN}"
59+
( cd dist && shasum -a 256 "${ARCHIVE}" > "${ARCHIVE}.sha256" )
60+
- name: Install cosign
61+
uses: sigstore/cosign-installer@v3.7.0
62+
- name: Sign archive with cosign (keyless)
63+
run: |
64+
set -euo pipefail
65+
BIN=animus-queue-default
66+
ARCHIVE="${BIN}-${{ matrix.target }}.tar.gz"
67+
cd dist
68+
cosign sign-blob \
69+
--yes \
70+
--bundle "${ARCHIVE}.bundle" \
71+
"${ARCHIVE}"
72+
- uses: softprops/action-gh-release@v2
73+
with:
74+
files: dist/*

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "animus-queue-default"
3-
version = "0.3.2"
3+
version = "0.3.3"
44
edition = "2021"
55
description = "Reference queue plugin for Animus v0.5 (lift-and-shift of in-tree dispatch queue + atomic queue/lease + queue/release_pending)"
66
license = "MIT OR Apache-2.0"

0 commit comments

Comments
 (0)