Skip to content

Bump version

Bump version #16

Workflow file for this run

name: Release
on:
push:
tags:
- '*'
jobs:
release:
strategy:
matrix:
job:
- os: ubuntu-latest
platform: linux
target: x86_64-unknown-linux-gnu
- os: macos-latest
platform: macos
target: x86_64-apple-darwin
- os: windows-latest
platform: windows
target: x86_64-pc-windows-msvc
runs-on: ${{ matrix.job.os }}
steps:
- uses: actions/checkout@v3
- name: Build
id: build
run: |
echo "tag_name=${GITHUB_REF_NAME}" >> $GITHUB_OUTPUT
cargo build --release --target ${{ matrix.job.target }}
- name: Archive binaries
id: binaries
env:
PLATFORM_NAME: ${{ matrix.job.platform }}
TARGET: ${{ matrix.job.target }}
run: |
if [ "$PLATFORM_NAME" == "linux" ]; then
tar -czvf "caracal-${GITHUB_REF_NAME}-${PLATFORM_NAME}.tar.gz" -C ./target/${TARGET}/release caracal
echo "file_name=caracal-${GITHUB_REF_NAME}-${PLATFORM_NAME}.tar.gz" >> $GITHUB_OUTPUT
elif [ "$PLATFORM_NAME" == "macos" ]; then
gtar -czvf "caracal-${GITHUB_REF_NAME}-${PLATFORM_NAME}.tar.gz" -C ./target/${TARGET}/release caracal
echo "file_name=caracal-${GITHUB_REF_NAME}-${PLATFORM_NAME}.tar.gz" >> $GITHUB_OUTPUT
else
cd ./target/${TARGET}/release
7z a -tzip "caracal-${GITHUB_REF_NAME}-${PLATFORM_NAME}.zip" caracal.exe
mv "caracal-${GITHUB_REF_NAME}-${PLATFORM_NAME}.zip" ../../../
echo "file_name=caracal-${GITHUB_REF_NAME}-${PLATFORM_NAME}.zip" >> $GITHUB_OUTPUT
fi
shell: bash
- name: Create draft release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.build.outputs.tag_name }}
draft: true
generate_release_notes: true
files: ${{ steps.binaries.outputs.file_name }}