forked from iden3/circomlib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request iden3#78 from iden3/add-publish-binaries
Publish binaries on new release added
- Loading branch information
Showing
1 changed file
with
32 additions
and
22 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,43 @@ | ||
name: release circom binaries | ||
|
||
name: Publish binaries | ||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
tags: | ||
- '*' | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build-ubuntu: | ||
runs-on: ubuntu-latest | ||
build-and-publish: | ||
name: Publish for ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
artifact_name: circom | ||
asset_name: circom-linux-amd64 | ||
- os: windows-latest | ||
artifact_name: circom.exe | ||
asset_name: circom-windows-amd64 | ||
- os: macos-latest | ||
artifact_name: circom | ||
asset_name: circom-macos-amd64 | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
- name: Compile | ||
id: compile | ||
run: cargo build --verbose --release | ||
- name: Checkout project | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build | ||
run: cargo build --verbose --release --locked | ||
|
||
- name: Run tests | ||
run: cargo test --verbose | ||
|
||
- name: Tar files | ||
run: tar -cvf circom.tar -C /home/runner/work/circom/circom/target/release circom | ||
- name: Tar files | ||
run: tar -cvf circom.tar -C /home/runner/work/circom/circom/target/release circom | ||
|
||
- name: Upload binary | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: circom | ||
path: | | ||
circom.tar | ||
- name: Upload binaries to release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
file: target/release/circom.tar | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ github.ref }} | ||
asset_name: ${{ matrix.asset_name }} |