Skip to content

Runtime Release Mac #67

Runtime Release Mac

Runtime Release Mac #67

on:
release:
types: [created]
workflow_dispatch:
name: Runtime Release Mac
jobs:
blockless_runtime:
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
- name: Get release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Edit Toml
uses: dmikey/toml-editor@master
with:
file: "bls-runtime/Cargo.toml"
key: "version"
value: "${{ steps.get_release.outputs.tag_name }}"
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
- name: Add rust Target
run: |
rustup target add ${{ matrix.target }}
rustup target list
- 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: target/${{ 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: Remove Files
run: |
rm -rf target/${{ matrix.target }}/release/*.d
rm -rf target/${{ matrix.target }}/release/*.rlib
- name: Archive Release
uses: thedoctor0/zip-release@main
with:
type: "tar"
filename: ../../../blockless-runtime.${{ matrix.os }}.${{ matrix.arch }}.tar.gz
directory: target/${{ matrix.target }}/release
path: .
- 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: blockless-runtime.${{ matrix.os }}.${{ matrix.arch }}.tar.gz
asset_name: blockless-runtime.${{ matrix.os }}.${{ matrix.arch }}.tar.gz
asset_content_type: application/gzip