Skip to content

Commit 57e2b7f

Browse files
update release.yml with musl fix
1 parent cc34776 commit 57e2b7f

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,20 @@ jobs:
6868
runs-on: ${{ matrix.os }}
6969
steps:
7070
- uses: actions/checkout@v4
71+
7172
- uses: dtolnay/rust-toolchain@stable
7273
with:
7374
targets: ${{ matrix.target }}
75+
7476
- uses: Swatinem/rust-cache@v2
77+
with:
78+
key: ${{ matrix.target }}
7579

7680
- name: Install musl-tools
7781
if: matrix.os == 'ubuntu-latest'
78-
run: sudo apt-get install -y musl-tools
82+
run: |
83+
sudo apt-get update
84+
sudo apt-get install -y musl-tools
7985
8086
- name: Build
8187
run: cargo build --release --target ${{ matrix.target }}
@@ -120,20 +126,21 @@ jobs:
120126
exit 0
121127
fi
122128
123-
gh release create "v$VERSION" --title "v$VERSION" --generate-notes
124-
125129
shopt -s nullglob
126130
ASSETS=(artifacts/*/*)
127131
echo "Found ${#ASSETS[@]} artifacts:"
128132
for f in "${ASSETS[@]}"; do
129133
echo " - $f"
130134
done
131135
132-
if [ "${#ASSETS[@]}" -eq 0 ]; then
133-
echo "No artifacts found to upload — failing"
136+
EXPECTED=4
137+
if [ "${#ASSETS[@]}" -ne "$EXPECTED" ]; then
138+
echo "Expected $EXPECTED artifacts, found ${#ASSETS[@]} — aborting release"
134139
exit 1
135140
fi
136141
142+
gh release create "v$VERSION" --title "v$VERSION" --generate-notes
143+
137144
FAILED=0
138145
for f in "${ASSETS[@]}"; do
139146
dir=$(basename "$(dirname "$f")")

0 commit comments

Comments
 (0)