Skip to content

Version 0.0.8 of rust binary #13

Version 0.0.8 of rust binary

Version 0.0.8 of rust binary #13

Workflow file for this run

name: release
on:
push:
branches:
- v0.*
jobs:
build:
name: Build Rust version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Install deps
run: |
sudo apt-get install make
rustup target add x86_64-apple-darwin
- name: Build for linux
run: |
cargo build --release
mv target/release/grotsky-rs grotsky-linux
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Prepare Release Linux
run: |
mv grotsky-linux grotsky
tar -czvf grotsky-${{ steps.extract_branch.outputs.branch }}-linux-x86_64.tar.gz grotsky
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.extract_branch.outputs.branch }}
release_name: Release ${{ steps.extract_branch.outputs.branch }}
body: |
Automated Release
draft: false
prerelease: false
- name: Upload Release Linux
id: upload-release-linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./grotsky-${{ steps.extract_branch.outputs.branch }}-linux-x86_64.tar.gz
asset_name: grotsky-${{ steps.extract_branch.outputs.branch }}-linux-x86_64.tar.gz
asset_content_type: application/gzip