2020-08-12 11:28:52 +03:00
|
|
|
name: Leo Release
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2020-08-12 11:29:09 +03:00
|
|
|
- feature/release
|
2020-08-13 02:20:23 +03:00
|
|
|
# tags:
|
|
|
|
# - 'v*.*.*'
|
|
|
|
|
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: |
|
|
|
|
cargo build --all --release && strip target/release/leo && mv target/release/leo target/release/leo_amd64
|
2020-08-12 11:28:52 +03:00
|
|
|
env:
|
|
|
|
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
|
|
|
|
|
|
|
- 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: |
|
|
|
|
target/release/leo_amd64
|
|
|
|
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: |
|
|
|
|
cargo build --all --release && strip target/release/leo && mv target/release/leo target/release/leo_darwin
|
|
|
|
env:
|
|
|
|
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
|
|
|
|
|
|
|
- name: Release
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
with:
|
|
|
|
files: |
|
|
|
|
target/release/leo_darwin
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2020-08-13 02:21:00 +03:00
|
|
|
windows:
|
|
|
|
name: Windows
|
2020-08-13 02:20:23 +03:00
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
|
2020-08-13 03:25:22 +03:00
|
|
|
# - name: Load snarkOS
|
|
|
|
# run: |
|
|
|
|
# echo "${{ secrets.SNARKOS_DEPLOY_KEY }}" > /c/Users/runneradmin/.ssh/id_rsa
|
|
|
|
# chmod 600 /c/Users/runneradmin/.ssh/id_rsa
|
|
|
|
# eval $(ssh-agent -s)
|
|
|
|
# ssh-add -k /c/Users/runneradmin/.ssh/id_rsa
|
2020-08-13 03:13:29 +03:00
|
|
|
# - uses: shimataro/ssh-key-action@v2
|
|
|
|
# with:
|
|
|
|
# key: ${{ secrets.SNARKOS_DEPLOY_KEY }}
|
|
|
|
# name: id_rsa
|
|
|
|
# known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
2020-08-13 03:25:22 +03:00
|
|
|
- uses: fusion-engineering/setup-git-credentials@v2
|
|
|
|
with:
|
|
|
|
credentials: ${{ secrets.SNARKOS_DEPLOY_KEY }}
|
2020-08-13 02:20:23 +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
|
|
|
|
env:
|
|
|
|
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
|
|
|
|
|
|
|
- name: Release
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
with:
|
|
|
|
files: |
|
|
|
|
target/release/leo.exe
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|