forked from ProvableHQ/aleo-rust
-
Notifications
You must be signed in to change notification settings - Fork 1
137 lines (116 loc) · 3.55 KB
/
release.yml
1
name: Aleo Releaseon: push: tags: - 'v*.*.*'env: RUST_BACKTRACE: 1jobs: ubuntu: name: Ubuntu runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v1 - name: Install Rust uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: stable override: true components: rustfmt - name: Build Aleo run: | cargo build --release && strip target/release/aleo - id: get_version uses: battila7/get-version-action@v2 - name: Zip run: | mkdir tempdir mv target/release/aleo tempdir cd tempdir zip -r aleo-${{ steps.get_version.outputs.version }}-x86_64-unknown-linux-gnu.zip aleo cd .. mv tempdir/aleo-${{ steps.get_version.outputs.version }}-x86_64-unknown-linux-gnu.zip . - name: Release uses: softprops/action-gh-release@v1 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 steps: - name: Checkout uses: actions/checkout@v1 - name: Install Rust uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: stable override: true components: rustfmt - name: Build Aleo run: | cargo build --release && strip target/release/aleo env: CARGO_NET_GIT_FETCH_WITH_CLI: true - id: get_version uses: battila7/get-version-action@v2 - name: Zip run: | mkdir tempdir mv target/release/aleo tempdir cd tempdir zip -r aleo-${{ steps.get_version.outputs.version }}-x86_64-apple-darwin.zip aleo cd .. mv tempdir/aleo-${{ steps.get_version.outputs.version }}-x86_64-apple-darwin.zip . - name: Release uses: softprops/action-gh-release@v1 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 steps: - name: Checkout uses: actions/checkout@v3 - 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@v1 with: version: "11.0" directory: ${{ runner.temp }}/llvm - name: Set LIBCLANG_PATH run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV - name: Build Aleo run: | cargo build --release env: CARGO_NET_GIT_FETCH_WITH_CLI: true - id: get_version uses: battila7/get-version-action@v2 - name: Zip run: | Compress-Archive target/release/aleo.exe aleo-${{ steps.get_version.outputs.version }}-x86_64-pc-windows-gnu.zip - name: Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: files: | aleo-${{ steps.get_version.outputs.version }}-x86_64-pc-windows-gnu.zip env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}