Skip to content

Commit 98b7f59

Browse files
committed
remove cargo-overlay
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
1 parent 3369c40 commit 98b7f59

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

.github/workflows/CreateRelease.yml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -90,24 +90,26 @@ jobs:
9090
if: ${{ contains(github.ref, 'refs/heads/release/') }}
9191
uses: rust-lang/crates-io-auth-action@v1
9292
id: crates-io-auth
93-
- name: Install cargo-overlay-registry
94-
if: ${{ contains(github.ref, 'refs/heads/release/') }}
95-
run: cargo install cargo-overlay-registry
96-
shell: bash
93+
9794
- name: Publish to crates.io
9895
if: ${{ contains(github.ref, 'refs/heads/release/') }}
9996
run: |
10097
set -euxo pipefail
101-
rm -Rf ./target/package/tmp-registry
102-
cargo overlay-registry \
103-
-r crates-io \
104-
-r local=./target/package/tmp-registry \
105-
-- \
106-
cargo +1.92 publish \
107-
-p hyperlight-wasm-aot \
108-
-p hyperlight-wasm-macro \
109-
-p hyperlight-wasm-runtime \
110-
-p hyperlight-wasm
98+
99+
publish_if_needed() {
100+
local crate=$1
101+
if curl -sf "https://crates.io/api/v1/crates/$crate/$HYPERLIGHTWASM_VERSION" | jq -e .version > /dev/null 2>&1; then
102+
echo "✅ $crate@$HYPERLIGHTWASM_VERSION already published, skipping."
103+
else
104+
echo "🚀 Publishing $crate@$HYPERLIGHTWASM_VERSION"
105+
cargo +1.92 publish -p "$crate"
106+
fi
107+
}
108+
109+
publish_if_needed hyperlight-wasm-macro
110+
publish_if_needed hyperlight-wasm-runtime
111+
publish_if_needed hyperlight-wasm-aot
112+
publish_if_needed hyperlight-wasm
111113
env:
112114
CARGO_REGISTRY_TOKEN: ${{ steps.crates-io-auth.outputs.token }}
113115
shell: bash

0 commit comments

Comments
 (0)