Merge pull request #3453 from ProvableHQ/mainnet-release #51
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: snarkOS Release | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
env: | |
RUST_BACKTRACE: 1 | |
jobs: | |
ubuntu: | |
name: Ubuntu | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: rustfmt | |
- name: Build snarkOS | |
run: | | |
cargo build --all --release && strip target/release/snarkos | |
- id: get_version | |
uses: battila7/get-version-action@v2 | |
- name: Zip | |
run: | | |
mkdir tempdir | |
mv target/release/snarkos tempdir | |
cd tempdir | |
zip -r aleo-${{ steps.get_version.outputs.version }}-x86_64-unknown-linux-gnu.zip snarkos | |
cd .. | |
mv tempdir/aleo-${{ steps.get_version.outputs.version }}-x86_64-unknown-linux-gnu.zip . | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
aleo-${{ steps.get_version.outputs.version }}-x86_64-unknown-linux-gnu.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
macos: | |
name: macOS | |
runs-on: macos-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: rustfmt | |
- name: Build snarkOS | |
run: | | |
cargo build --all --release && strip target/release/snarkos | |
- id: get_version | |
uses: battila7/get-version-action@v2 | |
- name: Zip | |
run: | | |
mkdir tempdir | |
mv target/release/snarkos tempdir | |
cd tempdir | |
zip -r aleo-${{ steps.get_version.outputs.version }}-x86_64-apple-darwin.zip snarkos | |
cd .. | |
mv tempdir/aleo-${{ steps.get_version.outputs.version }}-x86_64-apple-darwin.zip . | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
aleo-${{ steps.get_version.outputs.version }}-x86_64-apple-darwin.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
windows: | |
name: Windows | |
runs-on: windows-latest | |
permissions: | |
contents: write | |
continue-on-error: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: rustfmt | |
- name: Install LLVM and Clang | |
uses: KyleMayes/install-llvm-action@v2 | |
with: | |
version: "11" | |
directory: ${{ runner.temp }}/llvm | |
- name: Set LIBCLANG_PATH | |
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV | |
- name: Build snarkOS | |
run: | | |
cargo build --all --release | |
- id: get_version | |
uses: battila7/get-version-action@v2 | |
- name: Zip | |
run: | | |
Compress-Archive target/release/snarkos.exe aleo-${{ steps.get_version.outputs.version }}-x86_64-pc-windows-msvc.zip | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
aleo-${{ steps.get_version.outputs.version }}-x86_64-pc-windows-msvc.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |