Skip to content

Update rust.yml

Update rust.yml #24

Workflow file for this run

name: Rust
on:
workflow_dispatch:
pull_request:
push:
branches: 'main'
tags:
- "[0-9]+.[0-9]+.[0-9]+"
permissions:
contents: write
env:
RUST_BACKTRACE: 1
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: 0
CARGO_HUSKY_DONT_INSTALL_HOOKS: true
COMPLETION_DIR: "target/tmp/bottom/completion/"
MANPAGE_DIR: "target/tmp/bottom/manpage/"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'ClementTsang/bottom' }}
jobs:
release:
name: Release - ${{ matrix.platform.release_for }}
strategy:
matrix:
platform:
- release_for: Linux-x86_64
os: ubuntu-20.04
target: x86_64-unknown-linux-gnu
bin: imxceldownload
name: imxceldownload-Linux-x86_64.tar.gz
command: build
- release_for: Windows-x86_64
os: windows-latest
target: x86_64-pc-windows-msvc
bin: imxceldownload.exe
name: imxceldownload-Windows-x86_64.zip
command: both
- release_for: macOS-x86_64
os: macOS-latest
target: x86_64-apple-darwin
bin: imxceldownload
name: imxceldownload-Darwin-x86_64.tar.gz
command: both
runs-on: ${{ matrix.platform.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: ${{ matrix.platform.command }}
target: ${{ matrix.platform.target }}
args: "--locked --release"
strip: true
- name: Deploy Release
run: echo "Done!"
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
files: |
target/x86_64-unknown-linux-gnu/release/imxceldownload
target/x86_64-pc-windows-msvc/release/imxceldownload.exe
target/x86_64-apple-darwin/release/imxceldownload
# more packaging stuff goes here ...