forked from privacy-scaling-explorations/maci
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (48 loc) · 1.67 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Release
on:
push:
tags: ['*']
jobs:
draft-release:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Draft Release
run: |
gh release create ${GITHUB_REF##*/} --title "${GITHUB_REF##*/}" --draft --generate-notes --prerelease
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
# To prevent `npm install` failure of circuit package,
# it has to checkout manually because version of `circomlib` has pinned to a specific commit
- name: Checkout circomlib
run: |
git init circuits/node_modules/circomlib
cd circuits/node_modules/circomlib
git remote add origin https://github.com/weijiekoh/circomlib
git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin ac85e82c1914d47789e2032fb11ceb2cfdd38a2b
git checkout --progress --force ac85e82c1914d47789e2032fb11ceb2cfdd38a2b
rm -rf ./.git
- name: Initialize Project
run: |
git config --global url."https://github.com/".insteadOf git://github.com/
npm install
npx lerna bootstrap
npm run build
- name: Compile Contracts
run: |
cd contracts
npm run compileSol
- name: Publish NPM
run: |
npx lerna publish from-git --yes
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}