From 88f74f2de5964cad979a5a539de6cc70599b1835 Mon Sep 17 00:00:00 2001 From: bjay kamwa watanabe Date: Tue, 16 Dec 2025 12:21:16 +0100 Subject: [PATCH 1/3] Add Mac os target and windows target --- .github/workflows/rust.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 3a0a6f6..61e8fac 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -11,7 +11,10 @@ env: jobs: build: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, "macos-latest"] steps: - uses: actions/checkout@v4 From 55b2f4b96d6092a0dbc8f1aa0acd24db4a913d77 Mon Sep 17 00:00:00 2001 From: bjay kamwa watanabe Date: Tue, 16 Dec 2025 12:36:43 +0100 Subject: [PATCH 2/3] Add executable --- .github/workflows/rust.yml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 61e8fac..7398143 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -29,6 +29,33 @@ 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 (macOS) + if: matrix.os == 'macos-latest' + run: | + mkdir -p dist + cp target/release/tellers dist/tellers + tar -czf tellers-macos.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 From 3e5701049eb14c1862916c4b5829fb2c12f041c3 Mon Sep 17 00:00:00 2001 From: bjay kamwa watanabe Date: Tue, 16 Dec 2025 12:39:56 +0100 Subject: [PATCH 3/3] Remove Mac os --- .github/workflows/rust.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 7398143..7f20054 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -14,7 +14,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest, "macos-latest"] + os: [ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v4 @@ -38,12 +38,6 @@ jobs: mkdir -p dist cp target/release/tellers dist/tellers tar -czf tellers-linux.tar.gz -C dist tellers - - name: Package binary (macOS) - if: matrix.os == 'macos-latest' - run: | - mkdir -p dist - cp target/release/tellers dist/tellers - tar -czf tellers-macos.tar.gz -C dist tellers - name: Package binary (Windows) if: matrix.os == 'windows-latest' shell: pwsh