diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..1e7b354 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,35 @@ +name: Publish + +on: [push] + +permissions: + contents: read + packages: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: 18 + - name: "Setup Rust" + uses: ATiltedTree/setup-rust@v1 + with: + rust-version: nightly + components: clippy + - name: Download circom + run: wget https://github.com/iden3/circom/releases/latest/download/circom-linux-amd64 -O /usr/local/bin/circom + - name: Update permission + run: chmod +x /usr/local/bin/circom + - name: Install yarn + run: npm install -g yarn + - name: Install dependencies + run: yarn + - name: Publish binaries + run: yarn package + env: + NODE_AUTH_TOKEN: ${{ secrets.NODE_PRE_GYP_GITHUB_TOKEN }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 06b2997..650ecc8 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,4 +1,4 @@ -name: CI +name: Test on: [push] diff --git a/package.json b/package.json index 4a2f9d4..f184998 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,8 @@ ], "scripts": { "postinstall": "cargo install --path ./packages/compiler", - "test": "yarn workspaces -pt run test" + "test": "yarn workspaces -pt run test", + "package": "yarn workspaces -pt run package" }, "repository": { "type": "git",