-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: install macos sha256sum (#4489)
- Loading branch information
1 parent
5030d36
commit 9d6a7fb
Showing
2 changed files
with
57 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# This workflow is used for emergency artifact releases, e.g., when the release tag can not be created by the linked release workflow. | ||
name: Release (manual) | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: 'Tag to release' | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
file: forest-${{ github.event.inputs.tag }}-linux-amd64.zip | ||
- os: macos-latest | ||
file: forest-${{ github.event.inputs.tag }}-macos-amd64.zip | ||
steps: | ||
- name: Checkout Sources | ||
uses: actions/checkout@v4 | ||
- name: Homebrew Utils | ||
if: contains(matrix.os, 'macos') | ||
run: | | ||
brew install --verbose coreutils | ||
- 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.event.inputs.tag }} | ||
cp -v target/release/forest target/release/forest-cli target/release/forest-tool forest-${{ github.event.inputs.tag }} | ||
cp -rv CHANGELOG.md LICENSE-APACHE LICENSE-MIT README.md documentation forest-${{ github.event.inputs.tag }} | ||
sha256sum forest-${{ github.event.inputs.tag }}/forest > forest-${{ github.event.inputs.tag }}/forest.sha256 | ||
sha256sum forest-${{ github.event.inputs.tag }}/forest-cli > forest-${{ github.event.inputs.tag }}/forest-cli.sha256 | ||
sha256sum forest-${{ github.event.inputs.tag }}/forest-tool > forest-${{ github.event.inputs.tag }}/forest-tool.sha256 | ||
zip -r ${{ matrix.file }} forest-${{ github.event.inputs.tag }} | ||
- name: Upload Binary | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ github.token }} | ||
file: ${{ matrix.file }} | ||
asset_name: ${{ matrix.file }} | ||
tag: ${{ github.event.inputs.tag }} | ||
overwrite: true | ||
prerelease: true |