From b050e0d9ad3886e50a93dc6c28239f9bd4f64921 Mon Sep 17 00:00:00 2001 From: Patrick D'appollonio <930925+patrickdappollonio@users.noreply.github.com> Date: Tue, 27 Aug 2024 19:48:55 -0400 Subject: [PATCH] Use different versions for macOS vs Linux (#3) * Ensure versions in Cargo.toml match the version in tag. * Improve code. * Use multi-OS sed. --- .github/workflows/release.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 60bdb26..e3f273a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -35,7 +35,11 @@ jobs: # Update the version in Cargo.toml TAG_NAME="${{ github.event.release.tag_name }}" TAG_NAME="${TAG_NAME#v}" - sed -i "s/^version = .*/version = \"$TAG_NAME\"/" Cargo.toml + if [[ "${{ runner.os }}" == "macos-latest" ]]; then + sed -i "" "s/^version = .*/version = \"$TAG_NAME\"/" Cargo.toml + else + sed -i "s/^version = .*/version = \"$TAG_NAME\"/" Cargo.toml + fi - uses: taiki-e/upload-rust-binary-action@v1 with: bin: gc-rust