Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ env:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v4
Expand All @@ -26,6 +29,27 @@ jobs:
--additional-properties=packageName=tellers_api_client,packageVersion=0.1.0,library=reqwest,supportAsync=true,reqwestClient=true
--skip-validate-spec --strict-spec=false
- name: Build
run: cargo build --verbose
run: cargo build --verbose --release
- name: Run tests
run: cargo test --verbose
- name: Package binary (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
mkdir -p dist
cp target/release/tellers dist/tellers
tar -czf tellers-linux.tar.gz -C dist tellers
- name: Package binary (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
New-Item -ItemType Directory -Path dist -Force | Out-Null
Copy-Item -Path "target/release/tellers.exe" -Destination "dist/tellers.exe"
Compress-Archive -Path "dist/tellers.exe" -DestinationPath "tellers-windows.zip" -Force
- name: Upload packaged binary
uses: actions/upload-artifact@v4
with:
name: tellers-${{ matrix.os }}
path: |
tellers-linux.tar.gz
tellers-macos.tar.gz
tellers-windows.zip
Loading