File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626 - name : Publish to crates.io
2727 env :
2828 CARGO_REGISTRY_TOKEN : ${{ secrets.CRATES_IO_TOKEN }}
29- run : cargo publish
29+ run : |
30+ VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')
31+ NAME=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].name')
32+ # Check if this version already exists on crates.io
33+ if cargo search "$NAME" --limit 1 | grep -q "\"$VERSION\""; then
34+ echo "⚠️ $NAME@$VERSION already published to crates.io, skipping"
35+ else
36+ cargo publish
37+ fi
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ COPY resources/ebpf/vmlinux ./resources/ebpf/vmlinux
3131COPY src ./src
3232COPY benches ./benches
3333COPY assets/services ./assets/services
34+ COPY assets/oui.gz ./assets/oui.gz
3435
3536# Build the application in release mode (eBPF is enabled by default on Linux)
3637RUN cargo build --release
You can’t perform that action at this time.
0 commit comments