on:
push:
branches:
- release
tags:
- "v*"
name: Release
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout 🛎️
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- uses: actions-rs/cargo@v1
name: Compile all targets 🚀
with:
command: build
args: --workspace --release
- name: create tar
run: tar -cvzf nexmark-linux-amd64.tar.gz -C target/release nexmark
- uses: actions/create-release@latest
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: ${{ github.event.head_commit.message }}
draft: false
prerelease: true
- name: upload release (tar)
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: nexmark-linux-amd64.tar.gz
asset_name: nexmark-linux-amd64.tar.gz
asset_content_type: application/tar+gzip