diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4fd03333..7cce3f66 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -99,6 +99,19 @@ jobs: cargo hack --each-feature --keep-going \ build --target=${{ matrix.target }} --release + check-release-script: + name: check release script + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - name: compute libpathrs crate version + run: |- + CRATE_VERSION="$(cargo metadata --no-deps --format-version=1 | jq -rM '.packages[] | select(.name == "pathrs") | .version')" + echo "CRATE_VERSION=$CRATE_VERSION" >>"$GITHUB_ENV" + - run: ./hack/release.sh + - run: tar tvf ./release/${CRATE_VERSION}/libpathrs-${CRATE_VERSION}.tar.xz + - run: tar tvf ./release/${CRATE_VERSION}/libpathrs.vendor.tar.zst + fmt: name: rustfmt runs-on: ubuntu-latest @@ -636,6 +649,7 @@ jobs: - check - check-msrv - check-cross + - check-release-script - fmt - clippy - check-lint-nohack diff --git a/hack/release.sh b/hack/release.sh index 9fcb693b..41b3fda8 100755 --- a/hack/release.sh +++ b/hack/release.sh @@ -138,7 +138,8 @@ rm -rf "$outputdir" && mkdir -p "$outputdir" #done # Generate vendor.tar.zst. -generate_vendor - | zstd -11 >"$outputdir/$project.vendor.tar.zst" +generate_vendor "$outputdir/$project.vendor.tar" +zstd -11 --rm "$outputdir/$project.vendor.tar" -o "$outputdir/$project.vendor.tar.zst" # Generate new archive. git archive --format=tar --prefix="$project-$version/" "$commit" | xz > "$outputdir/$project-$version.tar.xz"