-
Notifications
You must be signed in to change notification settings - Fork 375
57 lines (54 loc) · 2.23 KB
/
protocol-devchain.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
name: 'CoreContracts: Devchain For Contract Release'
run-name: 'CoreContracts: Devchain For Contract Release'
on:
schedule:
# monthly on 1 at 0:00 UTC
- cron: 0 0 1 * *
workflow_dispatch:
permissions:
contents: read
jobs:
generate-protocol-devchain:
name: Generate protocol devchain used in celo-monorepo.yml workflow
runs-on: ['self-hosted', 'monorepo-node18']
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- tag: core-contracts.v9
node-version: 12
- tag: core-contracts.v11
node-version: 18
steps:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.tag }}
fetch-depth: 0
submodules: recursive
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install yarn dependencies
run: git config --global url."https://".insteadOf ssh:// && yarn install
- name: Build packages
run: yarn build --ignore docs --include-dependencies
# Workaround for https://stackoverflow.com/questions/72978485/git-submodule-update-failed-with-fatal-detected-dubious-ownership-in-repositor
# This is needed because some runners messup with permissions of git files and submodules. Particularly problematic for DinD runners (e.g. self-hosted+container arg)
- name: Configure git safe directories
run: git config --global --add safe.directory '*'
- name: Generate devchain of previous release
run: |
mkdir devchain
GRANTS_FILE=scripts/truffle/releaseGoldExampleConfigs.json
yarn --cwd packages/protocol devchain generate-tar devchain/devchain.tar.gz --release_gold_contracts $GRANTS_FILE
mv packages/protocol/build/contracts* devchain/
- name: Upload devchain as artifact
uses: actions/upload-artifact@v4
with:
name: devchain-${{ matrix.tag }}
path: devchain
# Max retention time is 90 days for public repos
# https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#artifact-and-log-retention-policy
retention-days: 90