Add Linux & Windows deploys

This commit is contained in:
2024-04-23 21:32:29 -05:00
parent 9c2910aea8
commit d0bf154c59
3 changed files with 70 additions and 1 deletions

34
.github/workflows/linux.yaml vendored Normal file
View File

@@ -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

View File

@@ -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

34
.github/workflows/windows.yaml vendored Normal file
View File

@@ -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