Skip to content

chore: prepare release v0.19.0 Pastel de nata (#4483) #58

chore: prepare release v0.19.0 Pastel de nata (#4483)

chore: prepare release v0.19.0 Pastel de nata (#4483) #58

Workflow file for this run

name: Release
on:
push:
tags:
- v*
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
file: forest-${{ github.ref_name }}-linux-amd64.zip
- os: macos-latest
file: forest-${{ github.ref_name }}-macos-amd64.zip
steps:
- name: Checkout Sources
uses: actions/checkout@v4
- name: Rust Cache
uses: Swatinem/rust-cache@v2
timeout-minutes: 5
continue-on-error: true
- name: Cargo Build
run: cargo build --release --bin forest --bin forest-cli --bin forest-tool
- name: Compress Binary
run: |
mkdir -p forest-${{ github.ref_name }}
cp -v target/release/forest target/release/forest-cli target/release/forest-tool forest-${{ github.ref_name }}
cp -rv CHANGELOG.md LICENSE-APACHE LICENSE-MIT README.md documentation forest-${{ github.ref_name }}
# If `sha256sum` is not defined, then we're likely running MacOS. Use an alias.
# An alternative is to install `coreutils`.
type sha256sum >/dev/null 2>&1 || alias sha256sum='shasum -a 256'
sha256sum forest-${{ github.ref_name }}/forest > forest-${{ github.ref_name }}/forest.sha256
sha256sum forest-${{ github.ref_name }}/forest-cli > forest-${{ github.ref_name }}/forest-cli.sha256
sha256sum forest-${{ github.ref_name }}/forest-tool > forest-${{ github.ref_name }}/forest-tool.sha256
zip -r ${{ matrix.file }} forest-${{ github.ref_name }}
- name: Upload Binary
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ github.token }}
file: ${{ matrix.file }}
asset_name: ${{ matrix.file }}
tag: ${{ github.ref_name }}
overwrite: true
prerelease: true