Skip to content

Commit

Permalink
Update rust.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
fvacek authored Dec 20, 2024
1 parent ec5e7e3 commit bfb16e5
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,16 @@ jobs:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
toolchain: stable
- os: windows-latest
target: x86_64-pc-windows-msvc
toolchain: stable
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
toolchain: nightly
- os: windows-latest
target: x86_64-pc-windows-msvc
toolchain: nightly
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -30,7 +38,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
toolchain: ${{ matrix.toolchain }}
override: true

- name: Install target
Expand All @@ -39,15 +47,15 @@ jobs:
- name: Build project
run: cargo build --release --target ${{ matrix.target }}

- name: Find and Upload binary
- name: Find and Move Binary
run: |
binary_path=$(find target/${{ matrix.target }}/release -maxdepth 1 -type f -executable)
echo "Binary path: $binary_path"
mv $binary_path ${{ matrix.target }}-binary
mv $binary_path ${{ matrix.target }}-${{ matrix.toolchain }}-binary
shell: bash

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-binary
path: ${{ matrix.target }}-binary
name: ${{ matrix.os }}-${{ matrix.toolchain }}-binary
path: ${{ matrix.target }}-${{ matrix.toolchain }}-binary

0 comments on commit bfb16e5

Please sign in to comment.