Skip to content

Car Utils Release Mac #26

Car Utils Release Mac

Car Utils Release Mac #26

on:
release:
types: [created]
workflow_dispatch:
name: Car Utils Release Mac
jobs:
car_utils:
strategy:
matrix:
include:
- build: macos
os: macos-latest
rust: stable
target: x86_64-apple-darwin
arch: x86_64
- build: macos_arm64
os: macos-latest
rust: stable
target: aarch64-apple-darwin
arch: aarch64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- run: rustup target add aarch64-apple-darwin
- name: Build runtime
uses: actions-rs/cargo@v1
with:
use-cross: false
command: build
args: --release --all-features --target ${{ matrix.target }}
- name: Remove File
uses: JesseTG/[email protected]
with:
path: target/${{ matrix.target }}/release/.fingerprint
- name: Remove File
uses: JesseTG/[email protected]
with:
path: target/${{ matrix.target }}/release/examples
- name: Remove File
uses: JesseTG/[email protected]
with:
path: ttarget/${{ matrix.target }}/release/build
- name: Remove File
uses: JesseTG/[email protected]
with:
path: target/${{ matrix.target }}/release/incremental
- name: Remove File
uses: JesseTG/[email protected]
with:
path: target/${{ matrix.target }}/release/examples
- name: Remove File
uses: JesseTG/[email protected]
with:
path: target/${{ matrix.target }}/release/deps
- name: Archive Release
uses: thedoctor0/zip-release@main
with:
type: "tar"
filename: ../../../car-utils.${{ matrix.os }}.${{ matrix.arch }}.tar.gz
directory: target/${{ matrix.target }}/release
path: .
- name: Get release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: upload artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: car-utils.${{ matrix.os }}.${{ matrix.arch }}.tar.gz
asset_name: car-utils.${{ matrix.os }}.${{ matrix.arch }}.tar.gz
asset_content_type: application/gzip