Skip to content

Merge pull request #155 from threshold-network/auto-increase #73

Merge pull request #155 from threshold-network/auto-increase

Merge pull request #155 from threshold-network/auto-increase #73

Workflow file for this run

name: NPM
on:
push:
branches:
- main
paths:
- "contracts/**"
- "deploy/**"
- "hardhat.config.ts"
- "package.json"
- "yarn.lock"
workflow_dispatch:
jobs:
npm-compile-publish-contracts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
# Using fixed version, because 18.16 may cause issues with the
# artifacts generation during `hardhat compile` - see
# https://github.com/NomicFoundation/hardhat/issues/3877.
node-version: "18.15.0"
registry-url: "https://registry.npmjs.org"
cache: "yarn"
- name: Resolve latest contracts
run: |
yarn upgrade --exact \
@keep-network/keep-core
# Deploy contracts to a local network to generate deployment artifacts that
# are required by dashboard compilation.
- name: Deploy contracts
run: yarn deploy --network hardhat --write true
- name: Bump up package version
id: npm-version-bump
uses: keep-network/npm-version-bump@v2
with:
environment: dev
branch: ${{ github.ref }}
commit: ${{ github.sha }}
- name: Publish package
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --access=public --network=hardhat --tag=development