From a78a00e0487ee6badf23d11d16b41c63e33552a4 Mon Sep 17 00:00:00 2001 From: MrEnder0 <72358826+MrEnder0@users.noreply.github.com> Date: Sat, 20 Jan 2024 19:12:11 -0600 Subject: [PATCH] =?UTF-8?q?run=20actions=20on=20windows=20instead=20?= =?UTF-8?q?=F0=9F=AA=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c9298f8..e5f4b6f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,7 @@ on: jobs: build-and-release: - runs-on: ubuntu-latest + runs-on: windows-latest steps: - uses: actions/checkout@v3 @@ -20,7 +20,9 @@ jobs: - name: Extract version from Cargo.toml id: extract_version - run: echo ::set-output name=version::$(grep -oP '^version\s*=\s*"\K[^"]+' Cargo.toml) + run: | + Get-Content Cargo.toml | Select-String -Pattern '^version\s*=\s*"([^"]+)"' | ForEach-Object { $_.Matches[0].Groups[1].Value } | Set-Content -Path version.txt + echo ::set-output name=version::$(Get-Content version.txt) - name: Get latest release version id: get_latest_release @@ -35,7 +37,6 @@ jobs: run: | rustup target add x86_64-pc-windows-gnu cargo build --release --target x86_64-pc-windows-gnu - cargo build --release --target x86_64-unknown-linux-gnu - name: Create release if: ${{ steps.extract_version.outputs.version != steps.get_latest_release.outputs.data.tag_name }}