From e47771c3c55ea7c06c04fc0e514ebd6f28609c43 Mon Sep 17 00:00:00 2001 From: Yuwei Ba Date: Fri, 8 Nov 2024 03:03:37 +1100 Subject: [PATCH] build(ci): Update ci.yml (#643) * Update ci.yml Signed-off-by: Yuwei Ba * Update ci.yml Signed-off-by: Yuwei Ba --------- Signed-off-by: Yuwei Ba --- .github/workflows/ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b21d59b39..534df2125 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -216,11 +216,18 @@ jobs: version: "23.x" repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Set environment variables + - name: Set environment variables (non Windows) + if: matrix.os != 'windows-latest' run: | echo "CLASH_GIT_REF=${GITHUB_REF}" >> $GITHUB_ENV echo "CLASH_GIT_SHA=${GITHUB_SHA}" >> $GITHUB_ENV + - name: Set environment variables (Windows) + if: matrix.os == 'windows-latest' + run: | + echo "CLASH_GIT_REF=$env:GITHUB_REF" | Out-File -FilePath $env:GITHUB_ENV -Append + echo "CLASH_GIT_SHA=$env:GITHUB_SHA" | Out-File -FilePath $env:GITHUB_ENV -Append + - name: Cargo fmt uses: clechasseur/rs-cargo@v2 with: