This repository has been archived by the owner on Apr 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
98 lines (98 loc) · 4.05 KB
/
deploy-proxy-contract.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Deploy contracts
on:
push:
branches: [ main ]
jobs:
changes:
runs-on: ubuntu-latest
outputs:
ci: ${{ steps.changes.outputs.ci }}
main-contract: ${{ steps.changes.outputs.main-contract }}
nft-contract: ${{ steps.changes.outputs.nft-contract }}
sft-contract: ${{ steps.changes.outputs.sft-contract }}
x-contract: ${{ steps.changes.outputs.x-contract }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
ci:
- '.github/workflows/deploy-proxy-contract.yml'
main-contract:
- 'fc-community-contracts/src/FactchainCommunity.sol'
nft-contract:
- 'fc-community-contracts/src/FactchainNFT.sol'
sft-contract:
- 'fc-community-contracts/src/FactchainSFT.sol'
x-contract:
- 'fc-community-contracts/src/XCommunityNotes.sol'
token: ''
deploy-contracts:
runs-on: ubuntu-latest
needs:
- changes
permissions: write-all
steps:
- uses: actions/checkout@v4
- name: Deploy new implementation of main contract
if: needs.changes.outputs.main-contract == 'true' || needs.changes.outputs.ci == 'true'
uses: YBadiss/deploy-contract/proxy@v2
with:
implementation-contract-name: 'FactchainCommunity'
proxy-contract-address: ${{ vars.FACTCHAIN_COMMUNITY_PROXY_ADDRESS }}
call-args: ''
deployer-pk: ${{ secrets.DEPLOYER_PK }}
owner-pk: ${{ secrets.OWNER_PK }}
parent-dir: 'fc-community-contracts'
chain-id: '11155111'
rpc-url: ${{ secrets.RPC_ETH_SEPOLIA_HTTPS }}
verify: true
etherscan-url: 'https://sepolia.etherscan.io'
etherscan-api-key: ${{ secrets.ETHERSCAN_SEPOLIA_API_KEY }}
- name: Deploy new implementation of SFT contract
if: needs.changes.outputs.sft-contract == 'true' || needs.changes.outputs.ci == 'true'
id: sft
uses: YBadiss/deploy-contract/proxy@v2
with:
implementation-contract-name: 'FactchainSFT'
proxy-contract-address: ${{ vars.FACTCHAIN_SFT_PROXY_ADDRESS }}
call-args: ''
deployer-pk: ${{ secrets.DEPLOYER_PK }}
owner-pk: ${{ secrets.NFT_OWNER_PK }}
parent-dir: 'fc-community-contracts'
chain-id: '11155111'
rpc-url: ${{ secrets.RPC_ETH_SEPOLIA_HTTPS }}
verify: true
etherscan-url: 'https://sepolia.etherscan.io'
etherscan-api-key: ${{ secrets.ETHERSCAN_SEPOLIA_API_KEY }}
- name: Deploy new implementation of NFT contract
if: needs.changes.outputs.nft-contract == 'true' || needs.changes.outputs.ci == 'true'
uses: YBadiss/deploy-contract/proxy@v2
with:
implementation-contract-name: 'FactchainNFT'
proxy-contract-address: ${{ vars.FACTCHAIN_NFT_PROXY_ADDRESS }}
call-args: ''
deployer-pk: ${{ secrets.DEPLOYER_PK }}
owner-pk: ${{ secrets.NFT_OWNER_PK }}
parent-dir: 'fc-community-contracts'
chain-id: '11155111'
rpc-url: ${{ secrets.RPC_ETH_SEPOLIA_HTTPS }}
verify: true
etherscan-url: 'https://sepolia.etherscan.io'
etherscan-api-key: ${{ secrets.ETHERSCAN_SEPOLIA_API_KEY }}
- name: Deploy new implementation of X contract
if: needs.changes.outputs.x-contract == 'true' || needs.changes.outputs.ci == 'true'
uses: YBadiss/deploy-contract/proxy@v2
with:
implementation-contract-name: 'XCommunityNotes'
proxy-contract-address: ${{ vars.X_COMMUNITY_NOTES_PROXY_ADDRESS }}
call-args: ''
deployer-pk: ${{ secrets.DEPLOYER_PK }}
owner-pk: ${{ secrets.OWNER_PK }}
parent-dir: 'fc-community-contracts'
chain-id: '11155111'
rpc-url: ${{ secrets.RPC_ETH_SEPOLIA_HTTPS }}
verify: true
etherscan-url: 'https://sepolia.etherscan.io'
etherscan-api-key: ${{ secrets.ETHERSCAN_SEPOLIA_API_KEY }}