Skip to content

0.13.0

0.13.0 #167

Workflow file for this run

name: Build and release CLI
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
target:
- aarch64-unknown-linux-gnu
- x86_64-unknown-linux-gnu
- aarch64-apple-darwin
- x86_64-apple-darwin
- x86_64-pc-windows-msvc
include:
- target: aarch64-unknown-linux-gnu
os: ubuntu-20.04
ext: ''
- target: x86_64-unknown-linux-gnu
os: ubuntu-20.04
ext: ''
- target: aarch64-apple-darwin
os: macos-11.0
ext: ''
- target: x86_64-apple-darwin
os: macos-11.0
ext: ''
- target: x86_64-pc-windows-msvc
os: windows-2019
ext: '.exe'
steps:
- uses: actions/checkout@v1
- name: Get version
id: version
shell: bash
run: echo ::set-output name=VERSION::"$([[ "$GITHUB_REF" == refs/tags/v* ]] && echo ${GITHUB_REF#refs/tags/v} || echo '0.0.0')"
- name: Get file name
id: file
shell: bash
run: echo ::set-output name=FILE::${{ steps.version.outputs.VERSION }}-${{ matrix.target }}${{ matrix.ext }}
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Build CLI
working-directory: ./minhtml
run: cargo build --release -vvv
- name: Upload
uses: actions/upload-artifact@v4
with:
name: minhtml-${{ steps.file.outputs.FILE }}
path: ./target/release/minhtml${{ matrix.EXT }}
release:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v4
with:
path: '.'
merge-multiple: true
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: '*'