Skip to content

chore: cli version bump #6

chore: cli version bump

chore: cli version bump #6

Workflow file for this run

name: Release CLI
on:
push:
tags:
- v*
jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install latest rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Compile
id: compile
run: |
set -x
cargo build --release --manifest-path=cli/Cargo.toml
OUTPUT_DIR="built/output"
mkdir -p "$OUTPUT_DIR"
echo "BUILT_ARCHIVES=$OUTPUT_DIR" >> $GITHUB_OUTPUT
BIN=maccel
ARCHIVE=$BIN-cli.tar.gz
BIN_PATH=cli/target/release/$BIN
strip $BIN_PATH;
ARTIFACTS_FOLDER="${GITHUB_REPOSITORY#*/}_${GITHUB_REF_NAME}"
mkdir $ARTIFACTS_FOLDER
cp -r $BIN_PATH LICENSE $ARTIFACTS_FOLDER
tar -caf $ARCHIVE $ARTIFACTS_FOLDER/*
mv $ARCHIVE $OUTPUT_DIR
- name: Name Release
run: echo "RELEASE_NAME=${GITHUB_REPOSITORY#*/}-cli ${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
generate_release_notes: true
name: ${{ env.RELEASE_NAME }}
files: |
${{ steps.compile.outputs.BUILT_ARCHIVES }}/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}