From 4f043cfed525d7cca74b2aa1b21df1ceb3ed825f Mon Sep 17 00:00:00 2001 From: Celestial Date: Sun, 15 Feb 2026 19:21:31 +0100 Subject: [PATCH] ci(release): unblock v0.2.0 publish path --- .github/workflows/release.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index db4d3a0..5463235 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -229,8 +229,23 @@ jobs: echo "present=true" >> "${GITHUB_OUTPUT}" fi + - name: Check Crates.io Version + id: crate + shell: bash + run: | + VERSION="${{ needs.resolve-tag.outputs.clean_version }}" + CRATE="slotstrike" + META_URL="https://crates.io/api/v1/crates/${CRATE}" + + if curl --fail --silent "${META_URL}" | grep -q "\"num\":\"${VERSION}\""; then + echo "exists=true" >> "${GITHUB_OUTPUT}" + echo "${CRATE} ${VERSION} already exists on crates.io. Skipping publish." >> "${GITHUB_STEP_SUMMARY}" + else + echo "exists=false" >> "${GITHUB_OUTPUT}" + fi + - name: Publish to Cargo - if: steps.token.outputs.present == 'true' + if: steps.token.outputs.present == 'true' && steps.crate.outputs.exists != 'true' env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} run: cargo publish --locked @@ -250,7 +265,7 @@ jobs: target: x86_64-pc-windows-msvc suffix: windows-x86_64 archive: zip - - os: macos-13 + - os: macos-15-intel target: x86_64-apple-darwin suffix: macos-x86_64 archive: tar.gz