2020-08-12 11:28:52 +03:00
|
|
|
name: Leo Release
|
|
|
|
on:
|
|
|
|
push:
|
2020-08-13 10:21:35 +03:00
|
|
|
tags:
|
|
|
|
- 'v*.*.*'
|
2020-08-13 02:20:23 +03:00
|
|
|
|
2020-08-12 11:28:52 +03:00
|
|
|
env:
|
|
|
|
RUST_BACKTRACE: 1
|
|
|
|
|
|
|
|
jobs:
|
2020-08-13 02:20:23 +03:00
|
|
|
ubuntu:
|
2020-08-12 11:28:52 +03:00
|
|
|
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
|
2020-08-12 11:47:45 +03:00
|
|
|
run: |
|
2020-08-15 07:26:30 +03:00
|
|
|
cargo build --all --release && strip target/release/leo
|
2020-08-12 11:28:52 +03:00
|
|
|
env:
|
|
|
|
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
|
|
|
|
2020-08-14 11:04:47 +03:00
|
|
|
- name: Zip
|
|
|
|
run: |
|
2020-08-15 07:34:15 +03:00
|
|
|
mkdir leo_${{ steps.get_version.outputs.version }}_ubuntu && mv target/release/leo leo_${{ steps.get_version.outputs.version }}_ubuntu
|
|
|
|
zip -r leo_${{ steps.get_version.outputs.version }}_ubuntu.zip leo_${{ steps.get_version.outputs.version }}_ubuntu
|
2020-08-13 11:39:49 +03:00
|
|
|
|
2020-08-12 11:28:52 +03:00
|
|
|
- name: Release
|
|
|
|
uses: softprops/action-gh-release@v1
|
2020-08-12 11:44:46 +03:00
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
2020-08-12 11:28:52 +03:00
|
|
|
with:
|
|
|
|
files: |
|
2020-08-13 11:39:49 +03:00
|
|
|
leo_ubuntu.zip
|
2020-08-12 11:28:52 +03:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2020-08-13 02:21:00 +03:00
|
|
|
macos:
|
|
|
|
name: macOS
|
2020-08-13 02:20:23 +03:00
|
|
|
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: |
|
2020-08-15 07:26:30 +03:00
|
|
|
cargo build --all --release && strip target/release/leo
|
2020-08-13 02:20:23 +03:00
|
|
|
env:
|
|
|
|
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
|
|
|
|
2020-08-15 07:34:15 +03:00
|
|
|
- id: Fetch version number
|
|
|
|
uses: battila7/get-version-action@v2
|
|
|
|
|
2020-08-14 10:10:34 +03:00
|
|
|
- name: Zip
|
|
|
|
run: |
|
2020-08-15 07:34:15 +03:00
|
|
|
mkdir leo_${{ steps.get_version.outputs.version }}_macOS && mv target/release/leo leo_${{ steps.get_version.outputs.version }}_macOS
|
|
|
|
zip -r leo_${{ steps.get_version.outputs.version }}_macOS.zip leo_${{ steps.get_version.outputs.version }}_macOS
|
2020-08-13 11:39:49 +03:00
|
|
|
|
2020-08-13 02:20:23 +03:00
|
|
|
- name: Release
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
with:
|
|
|
|
files: |
|
2020-08-15 07:34:15 +03:00
|
|
|
leo_${{ steps.get_version.outputs.version }}_macOS.zip
|
2020-08-13 02:20:23 +03:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2020-08-14 09:05:47 +03:00
|
|
|
windows:
|
|
|
|
name: Windows
|
|
|
|
runs-on: windows-latest
|
2020-08-14 10:10:34 +03:00
|
|
|
continue-on-error: true
|
2020-08-14 09:05:47 +03:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
|
2020-08-14 10:21:35 +03:00
|
|
|
- name: Install SSH key
|
|
|
|
uses: shimataro/ssh-key-action@v1
|
|
|
|
with:
|
2020-08-14 10:24:24 +03:00
|
|
|
private-key: ${{ secrets.SNARKOS_DEPLOY_KEY_WINDOWS }}
|
|
|
|
public-key: ${{ secrets.SNARKOS_DEPLOY_KEY_WINDOWS_PUBLIC }}
|
2020-08-14 11:04:47 +03:00
|
|
|
name: id_rsa
|
2020-08-14 09:05:47 +03:00
|
|
|
|
|
|
|
- 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
|
|
|
|
|
2020-08-14 10:10:34 +03:00
|
|
|
- name: Zip
|
|
|
|
run: |
|
2020-08-14 11:04:47 +03:00
|
|
|
Compress-Archive leo.exe leo_windows.zip
|
2020-08-14 09:05:47 +03:00
|
|
|
|
|
|
|
- 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 }}
|
2020-08-13 02:20:23 +03:00
|
|
|
|