Skip to content

Add code to trigger workflow on push #1

Add code to trigger workflow on push

Add code to trigger workflow on push #1

Workflow file for this run

name: build-cli
on:
push:
tags:
# 'v[0-9]+.[0-9]+.[0-9]+' to match semantic version tag, e.g. v2.0.8
- "v[0-9]+.[0-9]+.[0-9]+"
branches:
- feature/github-action-for-cli
workflow_dispatch:
jobs:
build:
name: build command line interfaces for ${{ matrix.platform || matrix.os }}
strategy:
fail-fast: true
matrix:
os:
- ubuntu
- macos
- windows
include:
- os: ubuntu
platform: linux
- os: windows
ls: dir
runs-on: ${{ format('{0}-latest', matrix.os) }}
steps:
- uses: actions/checkout@v3
- name: set up rust
if: matrix.os != 'ubuntu'
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: set up rust for ubuntu
if: matrix.os == 'ubuntu'
run: >
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=nightly --profile=minimal -y &&
rustup show
- run: rustup target add aarch64-apple-darwin
if: matrix.os == 'macos'
- name: run cargo tests
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: cd rust/ && cargo test
- name: list dist files
run: ${{ matrix.ls || 'ls -lh' }} dist/
- uses: actions/upload-artifact@v3
with:
path: ./target/release/