From 2f275ac50375385e97fb7666f5b5e071c302cda6 Mon Sep 17 00:00:00 2001 From: EAimTY Date: Thu, 8 Jun 2023 17:55:56 +0900 Subject: [PATCH] fix building script on windows --- .github/workflows/binary-release.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/binary-release.yml b/.github/workflows/binary-release.yml index 473f480..3fc5eb6 100644 --- a/.github/workflows/binary-release.yml +++ b/.github/workflows/binary-release.yml @@ -136,9 +136,8 @@ jobs: - name: Get package version on Windows if: runner.os == 'Windows' run: | - chcp 65001 - echo "version=$(sed -rn 's/^version = \"(.*)\"/\1/p' ${{ inputs.PACKAGE_NAME }}/Cargo.toml)" >> $env:GITHUB_ENV - echo "prerelease=$((sed -rn 's/^version = \"(.*)\"/\1/p' ${{ inputs.PACKAGE_NAME }}/Cargo.toml | grep -qF '-') && echo "true" || echo "false")" >> $env:GITHUB_ENV + echo "version=$(Get-Content ${{ inputs.PACKAGE_NAME }}/Cargo.toml | Select-String -Pattern '^version = \"(.*)\"' | ForEach-Object { $_.Matches.Groups[1].Value })" >> $env:GITHUB_ENV + echo "prerelease=$((Get-Content ${{ inputs.PACKAGE_NAME }}/Cargo.toml | Select-String -Pattern '^version = \"(.*)\"' | ForEach-Object { $_.Matches.Groups[1].Value } | Select-String -Quiet '-') && echo "false" || echo "true")" >> $env:GITHUB_ENV - name: Build uses: actions-rs/cargo@v1