-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (64 loc) · 2.46 KB
/
publish-contracts.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Build and publish fdp-contract blockchain image
# GH release doc https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release
on:
release:
types: [published]
tags-ignore:
- fdp-contracts-js-lib*
workflow_dispatch:
jobs:
publish-contracts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Install dependencies
run: npm ci
- name: Run the environment
run: npm run env:start-base
- name: Build image
run: ./scripts/build-image.sh
# Publishing contracts to testnets locally for now
# - name: Deploy to Goerli
# run: ./scripts/deploy.sh goerli
# env:
# GOERLI_URL: ${{secrets.GOERLI_URL}}
# GOERLI_PRIVATE_KEY: ${{secrets.GOERLI_PRIVATE_KEY}}
# VALIDATOR_ADDRESS: '0xd27ffA0e47Fca8D3E757B4d2C408169859B8c419'
# MAX_INTERVAL: 100000
# - name: Deploy to Sepolia
# run: ./scripts/deploy.sh sepolia
# env:
# SEPOLIA_URL: ${{secrets.SEPOLIA_URL}}
# SEPOLIA_PRIVATE_KEY: ${{secrets.SEPOLIA_PRIVATE_KEY}}
# VALIDATOR_ADDRESS: '0xd27ffA0e47Fca8D3E757B4d2C408169859B8c419'
# MAX_INTERVAL: 100000
# - name: Deploy to Optimism Goerli
# run: ./scripts/deploy.sh optimism_goerli
# env:
# SEPOLIA_URL: ${{secrets.OPTIMISM_GOERLI_URL}}
# SEPOLIA_PRIVATE_KEY: ${{secrets.OPTIMISM_GOERLI_PRIVATE_KEY}}
# VALIDATOR_ADDRESS: '0xd27ffA0e47Fca8D3E757B4d2C408169859B8c419'
# MAX_INTERVAL: 100000
# - name: Deploy to Arbitrum Goerli
# run: ./scripts/deploy.sh arbitrum_goerli
# env:
# SEPOLIA_URL: ${{secrets.ARBITRUM_GOERLI_URL}}
# SEPOLIA_PRIVATE_KEY: ${{secrets.ARBITRUM_GOERLI_PRIVATE_KEY}}
# VALIDATOR_ADDRESS: '0xd27ffA0e47Fca8D3E757B4d2C408169859B8c419'
# MAX_INTERVAL: 100000
- name: Publish image
run: ./scripts/release-image.sh
- name: Commit new contract metadata
uses: EndBug/add-and-commit@v9
with:
author_name: CI
author_email: [email protected]
message: 'feat(contract-upgrade): update contract metadata'
add: 'js-library/src/contracts/'