Skip to content

Improve CLI interface, add Runner trait and Command implementatio… #12

Improve CLI interface, add Runner trait and Command implementatio…

Improve CLI interface, add Runner trait and Command implementatio… #12

Workflow file for this run

name: Build assets for projects
on:
push
jobs:
publish-assets:
permissions: write-all
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
binary: [specification-tool]
include:
- os: windows-latest
platform-name: x86_64-pc-windows
executable-extension: ".exe"
- os: ubuntu-latest
platform-name: x86_64-unknown-linux
- binary: specification-tool]
name: spectra
runs-on: ${{ matrix.os }}
env:
LEVEL: debug
GH_RELEASE: assets
steps:
- uses: actions/checkout@v4
- name: Set variables
id: information
run: |
echo "GITHUB_RUN_DATE=$(TZ="Europe/London" date +"%Y-%m-%d %T")" >> "$GITHUB_OUTPUT"
echo "GIT_LAST_COMMIT=$(git log -n 1 --format="%H")" >> "$GITHUB_OUTPUT"
shell: bash
- name: Build ${{ matrix.name }} binary
working-directory: ${{ matrix.binary }}
run: cargo build
env:
GITHUB_RUN_DATE: ${{ steps.information.outputs.GITHUB_RUN_DATE }}
GIT_LAST_COMMIT: ${{ steps.information.outputs.GIT_LAST_COMMIT }}
- name: Publish ${{ matrix.name }} binary
working-directory: ${{ matrix.binary }}
run: gh release upload $GH_RELEASE ./target/$LEVEL/${{ matrix.name }}${{ matrix.executable-extension }}#${{ matrix.name }}-${{ matrix.platform-name }}${{ matrix.executable-extension }} --clobber
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}