Skip to content

Commit

Permalink
run actions on windows instead 🪟
Browse files Browse the repository at this point in the history
  • Loading branch information
MrEnder0 committed Jan 21, 2024
1 parent b6ac4c4 commit a78a00e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
build-and-release:
runs-on: ubuntu-latest
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
Expand All @@ -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
Expand All @@ -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 }}
Expand Down

0 comments on commit a78a00e

Please sign in to comment.