Update rust.yml

This commit is contained in:
Ahmet Kaan GÜMÜŞ 2023-09-17 07:56:27 +03:00 committed by GitHub
parent e3638162b0
commit ca483a520e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,25 +1,27 @@
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
release:
types: [created]
jobs:
build:
release:
name: release ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-pc-windows-gnu
archive: zip
- target: x86_64-unknown-linux-musl
archive: tar.gz
- target: x86_64-apple-darwin
archive: zip
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: rust-cargo
uses: actions-rs /cargo@v1.0.1
- uses: actions/checkout@master
- name: Compile and release
uses: rust-build/rust-build.action@v1.4.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
RUSTTARGET: ${{ matrix.target }}
ARCHIVE_TYPES: ${{ matrix.archive }}