From cea12a796fe4c0e73c929f1a1eb0f620e50a6dd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Thebault?= Date: Wed, 2 Jul 2025 22:03:05 +0200 Subject: [PATCH] windows CI --- .github/workflows/linux.yml | 2 +- .github/workflows/windows.yml | 42 +++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 0f85127..76736ad 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -1,4 +1,4 @@ -name: Main +name: Linux on: push diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000..9937964 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,42 @@ +name: Windows + +on: push + +jobs: + build: + runs-on: windows-latest + permissions: + contents: write + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Rust stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + + - name: Build & Test + run: cargo test + + - name: Get Termcalc Version + if: startsWith(github.ref, 'refs/tags/') + run: | + cargo install cargo-get + echo "TC_VERSION=$(cargo get package.version)" | Out-File -FilePath $env:GITHUB_ENV -Append + + - name: Build Windows release + if: startsWith(github.ref, 'refs/tags/') + run: | + cargo build --release + md target/dist + cp target/release/tc.exe target/dist/termcalc-${{ env.TC_VERSION }}-x86_64.exe + + - name: Upload Release Executable + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + target/dist/termcalc-${{ env.TC_VERSION }}-x86_64.exe +