Rust Hypervisor Firmware Release #95
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: Rust Hypervisor Firmware Release | |
on: [create] | |
env: | |
RUSTFLAGS: "-D warnings" | |
jobs: | |
release: | |
if: github.event_name == 'create' && github.event.ref_type == 'tag' | |
name: Release | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Code checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install rust-src | |
run: rustup component add rust-src | |
- name: Build (release) | |
run: cargo build --release --target x86_64-unknown-none.json -Zbuild-std=core,alloc -Zbuild-std-features=compiler-builtins-mem | |
- name: Create release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
draft: true | |
- name: Upload hypervisor-fw | |
id: upload-release-hypervisor-fw | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: target/x86_64-unknown-none/release/hypervisor-fw | |
asset_name: hypervisor-fw | |
asset_content_type: application/octet-stream |