mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 01:26:04 -08:00
47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
name: "Build artifacts"
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
TERMSCP_VERSION: "0.17.0"
|
|
|
|
jobs:
|
|
build-binaries:
|
|
name: Build - ${{ matrix.platform.release_for }}
|
|
strategy:
|
|
matrix:
|
|
platform:
|
|
- release_for: MacOS-x86_64
|
|
os: macos-latest
|
|
target: x86_64-apple-darwin
|
|
script: macos.sh
|
|
|
|
- release_for: MacOS-M1
|
|
os: macos-latest
|
|
target: aarch64-apple-darwin
|
|
script: macos.sh
|
|
|
|
runs-on: ${{ matrix.platform.os }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain: stable
|
|
targets: ${{ matrix.platform.target }}
|
|
- name: Build release
|
|
run: cargo build --release --target ${{ matrix.platform.target }}
|
|
- name: Prepare artifact files
|
|
run: |
|
|
mkdir -p .artifact
|
|
mv target/${{ matrix.platform.target }}/release/termscp .artifact/termscp
|
|
tar -czf .artifact/termscp-v${{ env.TERMSCP_VERSION }}-${{ matrix.platform.target }}.tar.gz -C .artifact termscp
|
|
ls -l .artifact/
|
|
- name: "Upload artifact"
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
if-no-files-found: error
|
|
retention-days: 1
|
|
name: termscp-${{ matrix.platform.target }}
|
|
path: .artifact/termscp-v${{ env.TERMSCP_VERSION }}-${{ matrix.platform.target }}.tar.gz
|