fix: auto-deploy testnet contracts with github actions

This commit is contained in:
Hank Stoever
2020-12-17 10:14:52 -08:00
parent ea54620a61
commit b1b5c977bc
9 changed files with 318 additions and 30 deletions

32
.github/workflows/deploy-contracts.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
name: deploy-contracts
on:
schedule:
- cron: "*/15 * * * *"
workflow_dispatch:
jobs:
deploy-contracts:
runs-on: ubuntu-latest
env:
API_SERVER: https://stacks-node-api.blockstack.org
CONTRACT_PRIVATE_KEY: ${{ secrets.CONTRACT_PRIVATE_KEY }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set Node Version
uses: actions/setup-node@v2-beta
with:
node-version: 12.16.1
- name: Restore lerna cache
id: lerna-cache
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install monorepo deps
run: yarn --frozen-lockfile
if: steps.lerna-cache.outputs.cache-hit != 'true'
- name: Deploy contracts
run: yarn deploy-contracts