File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616 steps :
1717 - uses : actions/checkout@v4
1818 - uses : dtolnay/rust-toolchain@stable
19+ - uses : Swatinem/rust-cache@v2
1920 - run : cargo test --verbose
2021 - run : cargo clippy --all-targets -- -D warnings
2122 - run : cargo fmt -- --check
Original file line number Diff line number Diff line change @@ -67,10 +67,10 @@ jobs:
6767 runs-on : ${{ matrix.os }}
6868 steps :
6969 - uses : actions/checkout@v4
70-
7170 - uses : dtolnay/rust-toolchain@stable
7271 with :
7372 targets : ${{ matrix.target }}
73+ - uses : Swatinem/rust-cache@v2
7474
7575 - name : Install musl-tools
7676 if : matrix.os == 'ubuntu-latest'
@@ -107,8 +107,14 @@ jobs:
107107 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
108108 run : |
109109 VERSION="${{ needs.check-version.outputs.version }}"
110- gh release create "v$VERSION" \
111- --title "v$VERSION" \
112- --generate-notes \
113- artifacts/*/* \
114- || echo "Release already exists"
110+ if gh release view "v$VERSION" &>/dev/null; then
111+ echo "Release v$VERSION already exists — skipping"
112+ exit 0
113+ fi
114+ shopt -s nullglob
115+ ASSETS=(artifacts/*/*)
116+ if [ ${#ASSETS[@]} -eq 0 ]; then
117+ gh release create "v$VERSION" --title "v$VERSION" --generate-notes
118+ else
119+ gh release create "v$VERSION" --title "v$VERSION" --generate-notes "${ASSETS[@]}"
120+ fi
You can’t perform that action at this time.
0 commit comments