Skip to content

ci/cd: upload artifacts between workflows #13

ci/cd: upload artifacts between workflows

ci/cd: upload artifacts between workflows #13

Workflow file for this run

name: Build
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
PROJECT_NAME: pterocli
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: linux-amd64
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- name: win-amd64
os: windows-latest
target: x86_64-pc-windows-msvc
- name: macos-amd64
os: macos-latest
target: x86_64-apple-darwin
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: "${{ matrix.target }}"
- name: Setup Cache
uses: Swatinem/rust-cache@v2
- name: Build Binary
run: cargo build --verbose --locked --release --target ${{ matrix.target }}
- name: Upload ${{ matrix.target }} pterocli artifact
uses: actions/upload-artifact@v4
if: matrix.os != 'windows-latest'
with:
name: pterocli-${{ matrix.name }}
path: target/${{ matrix.target }}/release/pterocli
- name: Upload ${{ matrix.name }} pterocli artifact
uses: actions/upload-artifact@v4
if: matrix.os == 'windows-latest'
with:
name: pterocli-${{ matrix.name }}.exe
path: target/${{ matrix.target }}/release/pterocli.exe