mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-23 18:21:38 +03:00
136 lines
3.3 KiB
YAML
136 lines
3.3 KiB
YAML
name: Leo Release
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*.*.*'
|
|
|
|
env:
|
|
RUST_BACKTRACE: 1
|
|
|
|
jobs:
|
|
ubuntu:
|
|
name: Ubuntu
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Load snarkOS
|
|
run: |
|
|
mkdir ~/.ssh
|
|
echo "${{ secrets.SNARKOS_DEPLOY_KEY }}" > ~/.ssh/id_rsa
|
|
chmod 600 ~/.ssh/id_rsa
|
|
eval $(ssh-agent -s)
|
|
ssh-add -k ~/.ssh/id_rsa
|
|
|
|
- name: Install Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
components: rustfmt
|
|
|
|
- name: Build Leo
|
|
run: |
|
|
cargo build --all --release && strip target/release/leo && mv target/release/leo leo
|
|
env:
|
|
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
|
|
|
- uses: montudor/action-zip@v0.1.0
|
|
with:
|
|
args: zip -qq -r ./leo_ubuntu.zip ./leo
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
files: |
|
|
leo_ubuntu.zip
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
macos:
|
|
name: macOS
|
|
runs-on: macos-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Load snarkOS
|
|
run: |
|
|
echo "${{ secrets.SNARKOS_DEPLOY_KEY }}" > ~/.ssh/id_rsa
|
|
chmod 600 ~/.ssh/id_rsa
|
|
eval $(ssh-agent -s)
|
|
ssh-add -k ~/.ssh/id_rsa
|
|
|
|
- name: Install Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
components: rustfmt
|
|
|
|
- name: Build Leo
|
|
run: |
|
|
cargo build --all --release && strip target/release/leo && mv target/release/leo leo
|
|
env:
|
|
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
|
|
|
- uses: montudor/action-zip@v0.1.0
|
|
with:
|
|
args: zip -qq -r ./leo_macOS.zip ./leo
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
files: |
|
|
leo_macOS.zip
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
windows:
|
|
name: Windows
|
|
runs-on: windows-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Load snarkOS
|
|
run: |
|
|
mkdir C:\Users\runneradmin\.ssh
|
|
echo $Env:SSH_KEY > C:\Users\runneradmin\.ssh\id_rsa
|
|
ssh -oStrictHostKeyChecking=no git@github.com
|
|
env:
|
|
SSH_KEY: ${{ secrets.SNARKOS_DEPLOY_KEY_WINDOWS }}
|
|
|
|
- name: Install Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
components: rustfmt
|
|
|
|
- name: Build Leo
|
|
run: |
|
|
cargo build --all --release && mv target/release/leo.exe leo.exe
|
|
env:
|
|
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
|
|
|
- uses: montudor/action-zip@v0.1.0
|
|
with:
|
|
args: zip -qq -r ./leo_windows.zip ./leo.exe
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
files: |
|
|
leo_windows.zip
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|