try to fix release action #11
Workflow file for this run
This file contains 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
name: Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Build canisters | |
run: | | |
rustup target add wasm32-unknown-unknown | |
cargo install ic-wasm | |
mkdir out | |
cargo build --target wasm32-unknown-unknown --release --locked -p ic_tee_identity | |
for CAN in ic_tee_identity | |
do | |
cp "target/wasm32-unknown-unknown/release/$CAN.wasm" out/ | |
cp "src/$CAN/$CAN.did" "out/$CAN.did" | |
WASM="out/$CAN.wasm" | |
ic-wasm $WASM -o $WASM metadata candid:service -f "out/$CAN.did" -v public | |
ic-wasm $WASM -o $WASM shrink | |
ic-wasm $WASM -o $WASM optimize O3 --inline-functions-with-loops | |
gzip $WASM | |
SHA256="$(sha256sum < "out/$CAN.wasm.gz" | sed 's/ .*$//g')" | |
echo $SHA256 > "out/$CAN.wasm.gz.$SHA256.txt" | |
done | |
ls -lah out | |
- name: Build linux binary | |
env: | |
RUSTFLAGS: -C target-feature=+crt-static -C link-args=-nostartfiles | |
run: | | |
rustup target add x86_64-unknown-linux-gnu | |
# Build proc-macro crates first without static linking | |
cargo build --release --locked -p asn1-rs-derive | |
# Then build the main binary with static linking | |
cargo build --release --locked -p ic_tee_nitro_gateway | |
cp "target/release/ic_tee_nitro_gateway" out/ | |
SHA256="$(sha256sum < "out/ic_tee_nitro_gateway" | sed 's/ .*$//g')" | |
echo $SHA256 > "out/ic_tee_nitro_gateway.$SHA256.txt" | |
ls -lah out | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: out/* |