Skip to content

Commit

Permalink
fix: update deploy scripts to load env with env-cmd (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
tremarkley authored Nov 19, 2024
1 parent 501ac98 commit ff4daef
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ jobs:
fetch-depth: 0
- name: Setup
uses: ./.github/actions/setup
- name: Write DEPLOYER_PRIVATE_KEY to .env
run: echo "DEPLOYER_PRIVATE_KEY=${{ vars.DEPLOYER_PRIVATE_KEY }}" >> packages/contracts/.env
- name: Run Tests
shell: bash
run: |
pnpm supersim &
pnpm deploy:contracts:ci
pnpm contracts:deploy:dev
pnpm e2e-test:ci
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@
"description": "",
"scripts": {
"dev": "mprocs",
"install:contracts": "cd packages/contracts && forge install",
"install:contracts": "pnpm nx run @superchainerc20-starter/contracts:install",
"contracts:update:rpcs": "pnpm nx run @superchainerc20-starter/contracts:update:rpcs",
"contracts:deploy:token": "pnpm nx run @superchainerc20-starter/contracts:deploy:token",
"update:toc": "doctoc README.md",
"e2e-test": "mprocs -c mprocs-e2e-test.yaml",
"init:env": "pnpm nx run-many --target=init:env",
"deploy:contracts:ci": "wait-port http://:8420/ready && cd packages/contracts && forge install && DEPLOY_CONFIG_PATH=/test/configs/test-deploy-config.toml forge script scripts/SuperchainERC20Deployer.s.sol --broadcast --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80",
"contracts:deploy:dev": "pnpm install:contracts && pnpm nx run @superchainerc20-starter/contracts:deploy:dev",
"e2e-test:ci": "pnpm nx run @superchainerc20-starter/e2e-test:test"
},
"license": "MIT",
"devDependencies": {
"cross-env": "^7.0.3",
"doctoc": "^2.2.1",
"env-cmd": "^10.1.0",
"mprocs": "^0.7.1",
"nx": "^20.0.7",
"prettier": "^3.3.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@superchainerc20-starter/contracts",
"main": "index.js",
"scripts": {
"deploy:dev": "source .env && wait-port http://:8420/ready && forge script scripts/SuperchainERC20Deployer.s.sol --broadcast --private-key $DEPLOYER_PRIVATE_KEY",
"deploy:token": "source .env && forge script scripts/SuperchainERC20Deployer.s.sol --broadcast --private-key $DEPLOYER_PRIVATE_KEY",
"deploy:dev": "env-cmd -f .env cross-env-shell 'wait-port http://:8420/ready && forge script scripts/SuperchainERC20Deployer.s.sol --broadcast --private-key $DEPLOYER_PRIVATE_KEY'",
"deploy:token": "env-cmd -f .env cross-env-shell 'forge script scripts/SuperchainERC20Deployer.s.sol --broadcast --private-key $DEPLOYER_PRIVATE_KEY'",
"update:rpcs": "cd ../.. && ./scripts/fetch-superchain-rpc-urls.sh",
"install": "forge install",
"build": "forge build",
Expand Down
25 changes: 25 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ff4daef

Please sign in to comment.