Add logging #2
Workflow file for this run
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
name: Release | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
mantle/target/ | |
key: ${{ runner.os }}-release-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Build release binary | |
working-directory: mantle | |
run: cargo build --verbose --locked --release | |
- name: Zip binary | |
uses: thedoctor0/[email protected] | |
with: | |
filename: mantle-win64.zip | |
path: mantle/target/release/mantle.exe | |
- name: Upload binary artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: mantle-win64 | |
path: mantle-win64.zip | |
macos: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
mantle/target/ | |
key: ${{ runner.os }}-release-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install rust | |
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
- name: Build release binary | |
working-directory: mantle | |
run: | | |
source $HOME/.cargo/env | |
cargo build --verbose --locked --release | |
env: | |
OPENSSL_STATIC: 1 | |
- name: Zip binary | |
uses: thedoctor0/[email protected] | |
with: | |
filename: mantle-macos.zip | |
path: mantle/target/release/mantle | |
- name: Upload binary artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: mantle-macos | |
path: mantle-macos.zip | |
linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
mantle/target/ | |
key: ${{ runner.os }}-release-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Build release binary | |
working-directory: mantle | |
run: cargo build --locked --verbose --release | |
env: | |
OPENSSL_STATIC: 1 | |
- name: Zip binary | |
uses: thedoctor0/[email protected] | |
with: | |
filename: mantle-linux.zip | |
path: mantle/target/release/mantle | |
- name: Upload binary artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: mantle-linux | |
path: mantle-linux.zip | |
- name: Generate schema | |
working-directory: mantle | |
run: cargo run --release --bin gen_schema > schema.json | |
- name: Upload schema artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: schema | |
path: mantle/schema.json | |
release: | |
runs-on: ubuntu-latest | |
needs: [windows, macos, linux] | |
steps: | |
- name: Download binaries | |
uses: actions/download-artifact@v2 | |
with: | |
path: artifacts | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
with: | |
# TODO: remove and add body_path once we have an automated release notes generator | |
draft: true | |
files: artifacts/*/* |