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 env: CARGO_NET_GIT_FETCH_WITH_CLI: true - name: Zip run: | 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 - 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 env: CARGO_NET_GIT_FETCH_WITH_CLI: true - id: Fetch version number uses: battila7/get-version-action@v2 - name: Zip run: | 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 - name: Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: files: | leo_${{ steps.get_version.outputs.version }}_macOS.zip env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} windows: name: Windows runs-on: windows-latest continue-on-error: true steps: - name: Checkout uses: actions/checkout@v1 - name: Install SSH key uses: shimataro/ssh-key-action@v1 with: private-key: ${{ secrets.SNARKOS_DEPLOY_KEY_WINDOWS }} public-key: ${{ secrets.SNARKOS_DEPLOY_KEY_WINDOWS_PUBLIC }} name: 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 && mv target/release/leo.exe leo.exe env: CARGO_NET_GIT_FETCH_WITH_CLI: true - name: Zip run: | Compress-Archive leo.exe leo_windows.zip - 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 }}