Skip to content

try auto release

try auto release #4

Workflow file for this run

name: Rust Build
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
targets: ['x86_64-unknown-linux-musl', 'x86_64-unknown-linux-gnu']
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: Install musl-tools
run: sudo apt-get update && sudo apt-get install -y musl-tools
- name: Build
run: |
rustup target add ${{ matrix.targets }}
cargo build --release --target=${{ matrix.targets }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.sha }}
release_name: $(date +%Y-%m-%d)-${{ github.sha }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/${{ matrix.targets }}/release/otk
asset_name: otk-${{ matrix.targets }}
asset_content_type: application/octet-stream