From d0bf154c59388a11581f96b7db4f002b898e9ca4 Mon Sep 17 00:00:00 2001 From: Xevion Date: Tue, 23 Apr 2024 21:32:29 -0500 Subject: [PATCH] Add Linux & Windows deploys --- .github/workflows/linux.yaml | 34 ++++++++++++++++++++ .github/workflows/{deploy.yaml => wasm.yaml} | 3 +- .github/workflows/windows.yaml | 34 ++++++++++++++++++++ 3 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/linux.yaml rename .github/workflows/{deploy.yaml => wasm.yaml} (92%) create mode 100644 .github/workflows/windows.yaml diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml new file mode 100644 index 0000000..38487a5 --- /dev/null +++ b/.github/workflows/linux.yaml @@ -0,0 +1,34 @@ +name: Linux + +on: [push] + +permissions: + contents: write + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Rust Toolchain (Linux) + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: x86_64-unknown-linux-gnu + override: true + + - name: Rust Cache + uses: Swatinem/rust-cache@v2 + + - name: Build + run: cargo build --release + + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + path: ./target/pacman + retention-days: 7 + if-no-files-found: error \ No newline at end of file diff --git a/.github/workflows/deploy.yaml b/.github/workflows/wasm.yaml similarity index 92% rename from .github/workflows/deploy.yaml rename to .github/workflows/wasm.yaml index a1a48f5..94bf4aa 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/wasm.yaml @@ -22,7 +22,7 @@ jobs: with: version: 3.1.43 - - name: Setup Rust WASM32 Toolchain + - name: Setup Rust (WASM32 Emscripten) uses: actions-rs/toolchain@v1 with: toolchain: stable @@ -45,6 +45,7 @@ jobs: uses: actions/upload-pages-artifact@v2 with: path: './dist/' + if-no-files-found: error retention-days: 7 - name: Deploy diff --git a/.github/workflows/windows.yaml b/.github/workflows/windows.yaml new file mode 100644 index 0000000..9084569 --- /dev/null +++ b/.github/workflows/windows.yaml @@ -0,0 +1,34 @@ +name: Windows + +on: [push] + +permissions: + contents: write + +jobs: + deploy: + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Rust (Windows) + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: x86_64-pc-windows-gnu + override: true + + - name: Rust Cache + uses: Swatinem/rust-cache@v2 + + - name: Build + run: cargo build --release + + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + path: ./target/pacman.exe + retention-days: 7 + if-no-files-found: error \ No newline at end of file