Skip to content

Commit

Permalink
Merge pull request iden3#78 from iden3/add-publish-binaries
Browse files Browse the repository at this point in the history
Publish binaries on new release added
  • Loading branch information
xavi-pinsach authored Jun 26, 2022
2 parents ed80776 + acb5145 commit fe0eb54
Showing 1 changed file with 32 additions and 22 deletions.
54 changes: 32 additions & 22 deletions .github/workflows/binaries.yml
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 }}

0 comments on commit fe0eb54

Please sign in to comment.