Skip to content

chore: Update rustscout and rustscout-cli to version 0.3.0 #12

chore: Update rustscout and rustscout-cli to version 0.3.0

chore: Update rustscout and rustscout-cli to version 0.3.0 #12

Workflow file for this run

name: Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
env:
CARGO_TERM_COLOR: always
jobs:
release:
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
name: linux-amd64
binary_name: rustscout-cli
archive_ext: tar.gz
- os: windows-latest
target: x86_64-pc-windows-msvc
name: windows-amd64
binary_name: rustscout-cli.exe
archive_ext: zip
- os: macos-latest
target: x86_64-apple-darwin
name: macos-amd64
binary_name: rustscout-cli
archive_ext: tar.gz
runs-on: ${{ matrix.os }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Generate Changelog
if: matrix.os == 'ubuntu-latest'
run: |
chmod +x scripts/update_changelog.sh
./scripts/update_changelog.sh ${{ github.ref_name }}
- name: Build Release Binary
run: |
cargo build --release --target ${{ matrix.target }} -p rustscout-cli
- name: Package Release Asset (Unix)
if: matrix.os != 'windows-latest'
run: |
cd target/${{ matrix.target }}/release
tar czf ../../../rustscout-${{ matrix.name }}.${{ matrix.archive_ext }} ${{ matrix.binary_name }}
- name: Package Release Asset (Windows)
if: matrix.os == 'windows-latest'
run: |
cd target/${{ matrix.target }}/release
7z a ../../../rustscout-${{ matrix.name }}.${{ matrix.archive_ext }} ${{ matrix.binary_name }}
- name: Create Release and Upload Assets
uses: softprops/action-gh-release@v1
if: success()
with:
name: Release ${{ github.ref_name }}
body_path: ${{ matrix.os == 'ubuntu-latest' && 'CHANGELOG.md' || '' }}
draft: false
prerelease: false
files: rustscout-${{ matrix.name }}.${{ matrix.archive_ext }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}