Skip to content

v1.1

v1.1 #5

Workflow file for this run

name: Release
on:
release:
types: [created]
jobs:
release:
name: release ${{ matrix.target }}
permissions: write-all
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
- target: x86_64-apple-darwin
os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Setup GO environment
uses: actions/setup-go@v4
with:
go-version: ~1.19
- name: Prepare Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-01-21
target: ${{ matrix.target }}
override: true
- name: Setup musl
uses: awalsh128/cache-apt-pkgs-action@v1
if: matrix.os == 'ubuntu-latest'
with:
packages: musl-tools
version: 1.0
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --target ${{ matrix.target }}
- name: Archive Tar
uses: a7ul/[email protected]
with:
command: c
cwd: target/${{ matrix.target }}/release
files: |
zkpool-prover
outPath: ${{ matrix.target }}.tar.gz
- name: Upload Release Asset - Tar
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ matrix.target }}.tar.gz
asset_name: ${{ matrix.target }}.tar.gz
asset_content_type: application/tar+gzip
- name: Archive Zip
uses: vimtor/action-zip@v1
with:
files: target/${{ matrix.target }}/release/zkpool-prover
dest: ${{ matrix.target }}.zip
- name: Upload Release Asset - Zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ matrix.target }}.zip
asset_name: ${{ matrix.target }}.zip
asset_content_type: application/zip