fix: workflow
This commit is contained in:
parent
9dce931274
commit
c9bab5de5f
2 changed files with 21 additions and 24 deletions
83
.github/workflows/rust.yml
vendored
Normal file
83
.github/workflows/rust.yml
vendored
Normal file
|
@ -0,0 +1,83 @@
|
|||
name: Rust Build & Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
build_linux:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Build
|
||||
run: cargo build --release --verbose
|
||||
- name: Run tests
|
||||
run: cargo test --verbose
|
||||
|
||||
- name: Upload Linux Binary
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: rust_tcp_file_transfer_linux_x64_86
|
||||
path: target/release/*transfer
|
||||
|
||||
build_windows:
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Build
|
||||
run: cargo build --release --verbose
|
||||
- name: Run tests
|
||||
run: cargo test --verbose
|
||||
|
||||
- name: Upload Windows Binary
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: rust_tcp_file_transfer_windows_x64_86
|
||||
path: target/release/*transfer.exe
|
||||
|
||||
build_macos:
|
||||
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Build
|
||||
run: cargo build --release --verbose
|
||||
- name: Run tests
|
||||
run: cargo test --verbose
|
||||
|
||||
- name: Upload MacOS Binary
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: rust_tcp_file_transfer_macos_x64_86
|
||||
path: target/release/*transfer
|
||||
|
||||
download_then_release:
|
||||
needs: [build_linux, build_windows, build_macos]
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- name: Forge a Folder
|
||||
run: mkdir Downloads
|
||||
working-directory: /home/runner/work/rust-tcp-file-transfer/rust-tcp-file-transfer/
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
name: Download
|
||||
with:
|
||||
path: Downloads/
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- name: Display Downloads
|
||||
run: ls -R
|
Loading…
Add table
Add a link
Reference in a new issue