* Update README.md
* Update release-cross.yml
* Update release.yml
* style(self_update): Run cargo fmt (#108)
The commit 9105a8aac is not formatted, which breaks the CI check.
Co-authored-by: Thomas Schönauer <37108907+DottoDev@users.noreply.github.com>
* Clap dependencie change
* Revert clap changes
Co-authored-by: pan93412 <pan93412@gmail.com>
67 lines
1.9 KiB
YAML
67 lines
1.9 KiB
YAML
name: CD Cross
|
|
|
|
on:
|
|
release:
|
|
types: [ created ]
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
target: [ "aarch64-unknown-linux-gnu", "armv7-unknown-linux-gnueabihf", "x86_64-unknown-linux-musl", "aarch64-unknown-linux-musl", "x86_64-unknown-freebsd", ]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: 1.57.0
|
|
profile: minimal
|
|
default: true
|
|
override: true
|
|
target: ${{ matrix.target }}
|
|
components: rustfmt, clippy
|
|
- uses: actions-rs/cargo@v1.0.1
|
|
name: Check format
|
|
with:
|
|
use-cross: true
|
|
command: fmt
|
|
args: --all -- --check
|
|
- uses: actions-rs/cargo@v1.0.1
|
|
name: Run clippy
|
|
with:
|
|
command: clippy
|
|
use-cross: true
|
|
args: --all-targets --locked --target ${{matrix.target}} -- -D warnings
|
|
- uses: actions-rs/cargo@v1.0.1
|
|
name: Run clippy (All features)
|
|
with:
|
|
command: clippy
|
|
use-cross: true
|
|
args: --locked --all-features --target ${{matrix.target}} -- -D warnings
|
|
- uses: actions-rs/cargo@v1.0.1
|
|
name: Run tests
|
|
with:
|
|
command: test
|
|
use-cross: true
|
|
args: --target ${{matrix.target}}
|
|
- uses: actions-rs/cargo@v1.0.1
|
|
name: Build
|
|
with:
|
|
command: build
|
|
use-cross: true
|
|
args: --release --all-features --target ${{matrix.target}}
|
|
- name: Rename Release
|
|
run: |
|
|
mkdir assets
|
|
FILENAME=topgrade-${{github.event.release.tag_name}}-${{matrix.target}}
|
|
mv target/${{matrix.target}}/release/topgrade assets
|
|
cd assets
|
|
tar --format=ustar -czf $FILENAME.tar.gz topgrade
|
|
rm topgrade
|
|
ls .
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: assets/*
|