Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Solidity contract

Solidity contract #10

name: CI
on:
push:
branches: [ main ]
paths: [ tm-community-contracts/** ]
pull_request:
branches: [ main ]
paths: [ tm-community-contracts/** ]
jobs:
code-checks:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./tm-community-contracts
steps:
- uses: actions/checkout@v3
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Run tests
run: forge test -vvv
deploy-contract:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./tm-community-contracts
steps:
- uses: actions/checkout@v3
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Deploy to sepolia
id: deploy
env:
ETH_RPC_NAME: eth-sepolia
ETH_RPC_URL: ${{ secrets.RPC_ETH_SEPOLIA_HTTPS }}
PRIVATE_KEY: ${{ secrets.TM_SEPOLIA_DEPLOYER_PK }}
OWNER: ${{ vars.TM_SEPOLIA_OWNER_ADDRESS }}
run: |
forge build
createOutput=`forge create TrueMintCommunity --rpc-url=$ETH_RPC_URL --private-key=$PRIVATE_KEY --constructor-args $OWNER`
echo "createOutput=$createOutput" >> $GITHUB_OUTPUT
- name: Notify of deployment
run: |
echo "Deployer: ${{fromJson(steps.deploy.outputs.createOutput).deployer}}"
echo "Deployed to: ${{fromJson(steps.deploy.outputs.createOutput).deployedTo}}"
echo "Transaction hash: ${{fromJson(steps.deploy.outputs.createOutput).transactionHash}}"