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: on:
push: release:
branches: [ "main" ] types: [created]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs: jobs:
build: release:
name: release ${{ matrix.target }}
runs-on: ubuntu-latest 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: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@master
- name: Build - name: Compile and release
run: cargo build --verbose uses: rust-build/rust-build.action@v1.4.3
- name: Run tests env:
run: cargo test --verbose GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: rust-cargo with:
uses: actions-rs /cargo@v1.0.1 RUSTTARGET: ${{ matrix.target }}
ARCHIVE_TYPES: ${{ matrix.archive }}