diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..f1882186 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +on: + workflow_dispatch: + push: + branches: + - "main" + pull_request: + +jobs: + build: + uses: "rhinestonewtf/reusable-workflows/.github/workflows/forge-build.yaml@main" + + release-artifacts: + needs: ["build"] + uses: "rhinestonewtf/reusable-workflows/.github/workflows/forge-release.yaml@main" + strategy: + matrix: + contract-name: + [ + "SmartSession", + "ERC20SpendingLimitPolicy", + "SudoPolicy", + "UniActionPolicy", + ] + with: + contract-name: ${{ matrix.contract-name }} + store-artifacts: true diff --git a/build-artifacts.sh b/build-artifacts.sh new file mode 100755 index 00000000..7fc61324 --- /dev/null +++ b/build-artifacts.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Check if a contract name is provided +if [ $# -eq 0 ]; then + echo "Please provide a contract name as an argument." + echo "Usage: $0 " + exit 1 +fi + +CONTRACT_NAME=$1 + +mkdir -p ./artifacts/$CONTRACT_NAME +forge build $CONTRACT_NAME +cp ./out/$CONTRACT_NAME.sol/* ./artifacts/$CONTRACT_NAME/. +forge verify-contract --show-standard-json-input $(cast address-zero) $CONTRACT_NAME > ./artifacts/$CONTRACT_NAME/verify.json +