Skip to content

Commit

Permalink
add macos/linux native builds
Browse files Browse the repository at this point in the history
  • Loading branch information
kali committed Aug 21, 2020
1 parent f8fe5f5 commit adcfe3d
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
on:
release:
types:
- created

name: Upload Release Assets

jobs:
assets:
name: Upload Release Assets
strategy:
matrix:
os: [ ubuntu-latest, macOS-latest ]
include:
- os: ubuntu-latest
name: linux
- os: macOS-latest
name: macos
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Extract version tag
id: version
run: echo ::set-output name=value::$(echo ${{ github.ref }} | cut -f 3 -d / )

- name: Build tract
run: |
cargo build --release -p tract
mkdir cargo-dinghy-${{ steps.version.outputs.value }}
mkdir tract-${{matrix.name}}-${{ steps.version.outputs.value }}
cp target/release/tract tract-${{matrix.name}}-${{ steps.version.outputs.value }}
tar czf tract-${{matrix.name}}-${{ steps.version.outputs.value }}.tgz tract-${{matrix.name}}-${{ steps.version.outputs.value }}
- name: Upload asset
uses: softprops/action-gh-release@v1
with:
files: tract-${{matrix.name}}-${{ steps.version.outputs.value }}.tgz
name: ${{ steps.version.outputs.value }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit adcfe3d

Please sign in to comment.