Skip to content

Commit

Permalink
github action
Browse files Browse the repository at this point in the history
  • Loading branch information
liamaharon committed Oct 17, 2023
1 parent efb28cd commit 4e27c67
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build-release-binaries.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build and Attach Binaries to Release

on:
release:
types:
- created

jobs:
build_and_upload:
strategy:
matrix:
platform:
- { os: ubuntu-latest, target: x86_64-unknown-linux-gnu }
- { os: macos-latest, target: x86_64-apple-darwin }

runs-on: ${{ matrix.platform.os }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Build Rust project
run: cargo build --release --target ${{ matrix.platform.target }}

- name: Upload Binary to Release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./target/${{ matrix.platform.target }}/release/try-runtime
asset_name: try-runtime-${{ matrix.platform.target }}
asset_content_type: application/octet-stream
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 4e27c67

Please sign in to comment.