name: Release

on: [push]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - name: Build
      run: |
        cargo build --release --example parse_sv
        cp target/release/examples/parse_sv bin/parse_sv

    - name: Commit
      uses: EndBug/add-and-commit@v2.1.0
      with:
        author_name: dalance
        author_email: dalance@gmail.com
        message: "Update bin"
        path: "./bin"
        pattern: "*"
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

    #steps:
    #- uses: davidgraeff/rust-musl-action@master
    #- uses: actions/checkout@master
    #- name: Build
    #  run: cargo build --target x86_64-unknown-linux-musl --release --example parse_sv
