mirror of
https://github.com/danog/ytop.git
synced 2024-11-26 20:15:03 +01:00
51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
name: Publish Binaries
|
|
|
|
on: release
|
|
|
|
env:
|
|
NAME: rtop
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- ubuntu-latest
|
|
- macOS-latest
|
|
target:
|
|
- x86_64-unknown-linux-gnu
|
|
- x86_64-apple-darwin
|
|
exclude:
|
|
- os: macOS-latest
|
|
target: x86_64-unknown-linux-gnu
|
|
- os: ubuntu-latest
|
|
target: x86_64-apple-darwin
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Install stable toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
target: ${{ matrix.target }}
|
|
override: true
|
|
|
|
- name: Build release binary
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
use-cross: true
|
|
command: build
|
|
args: --release --target=${{ matrix.target }}
|
|
|
|
- name: Archive and compress binary
|
|
run: tar -czf ${{ NAME }}-${{ GITHUB_REF }}-${{ matrix.target }}.tar.gz -C ./target/${{ matrix.target }}/release/ ${{ NAME }}
|
|
|
|
- name: Upload archive to GitHub releases
|
|
uses: JasonEtco/upload-to-release@master
|
|
with:
|
|
args: ${{ NAME }}-${{ GITHUB_REF }}-${{ matrix.target }}.tar.gz
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|