diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..c589dfa7 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,21 @@ +name: Build Action + +on: + push: + +jobs: + build: + name: Build + runs-on: ubuntu-latest + + steps: + - uses: actions/setup-node@v4 + with: + node-version: "20.10.0" + + - uses: actions/checkout@v4 + + - name: Install & Build + run: | + yarn install --immutable --immutable-cache --check-cache + yarn build diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..4d1d84ba --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,39 @@ +name: Compute Rewards + +on: + workflow_dispatch: + inputs: + stateId: + description: "State Id" + eventName: + description: "Event Name" + eventPayload: + description: "Event Payload" + settings: + description: "Settings" + authToken: + description: "Auth Token" + ref: + description: "Ref" + +jobs: + compute: + name: Rewards + runs-on: ubuntu-latest + permissions: write-all + + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + X25519_PRIVATE_KEY: ${{ secrets.X25519_PRIVATE_KEY }} + SUPABASE_URL: ${{ secrets.SUPABASE_URL }} + SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }} + NFT_MINTER_PRIVATE_KEY: ${{ secrets.NFT_MINTER_PRIVATE_KEY }} + NFT_CONTRACT_ADDRESS: ${{ secrets.NFT_CONTRACT_ADDRESS }} + PERMIT_FEE_RATE: ${{ secrets.PERMIT_FEE_RATE }} + PERMIT_TREASURY_GITHUB_USERNAME: ${{ secrets.PERMIT_TREASURY_GITHUB_USERNAME }} + PERMIT_ERC20_TOKENS_NO_FEE_WHITELIST: ${{ secrets.PERMIT_ERC20_TOKENS_NO_FEE_WHITELIST }} + + steps: + - name: Run compute rewards + uses: Meniole/conversation-rewards@development diff --git a/.gitignore b/.gitignore index 74814b90..5947debb 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ static/dist junit.xml coverage test-dashboard.md +dist \ No newline at end of file diff --git a/package.json b/package.json index bb9267ec..7e6c286f 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "node": ">=20.10.0" }, "scripts": { + "build": "ncc build src/index.ts", "test": "jest --setupFiles dotenv/config --coverage", "start": "tsx src/index.ts", "format": "run-s format:lint format:prettier format:cspell", @@ -63,6 +64,7 @@ "@types/jsdom": "21.1.6", "@types/markdown-it": "13.0.7", "@types/node": "20.11.28", + "@vercel/ncc": "0.38.2", "babel-jest": "29.7.0", "cspell": "8.3.2", "eslint": "9.12.0", diff --git a/tsconfig.json b/tsconfig.json index 60af739b..0ecbffce 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -29,14 +29,7 @@ // "rootDir": "./", /* Specify the root folder within your source files. */ "moduleResolution": "Node" /* Specify how TypeScript looks up a file from a given module specifier. */, // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ - "paths": { - "@ubiquibot/permit-generation/core": [ - "node_modules/@ubiquibot/permit-generation/dist/core/index.d.ts" - ], - "@ubiquibot/permit-generation/utils": [ - "node_modules/@ubiquibot/permit-generation/dist/utils/index.d.ts" - ] - }, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ // "types": [], /* Specify type package names to be included without being referenced in a source file. */ diff --git a/yarn.lock b/yarn.lock index 5dbe37ba..b25af09b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3720,6 +3720,11 @@ ethers "^5.7.0" tiny-invariant "^1.1.0" +"@vercel/ncc@0.38.2": + version "0.38.2" + resolved "https://registry.yarnpkg.com/@vercel/ncc/-/ncc-0.38.2.tgz#d35c3a74c671699ccf316f74bf0ecab6b60e312b" + integrity sha512-3yel3jaxUg9pHBv4+KeC9qlbdZPug+UMtUOlhvpDYCMSgcNSrS2Hv1LoqMsOV7hf2lYscx+BESfJOIla1WsmMQ== + "@zkochan/retry@^0.2.0": version "0.2.0" resolved "https://registry.yarnpkg.com/@zkochan/retry/-/retry-0.2.0.tgz#cb52c9fce1976f3eed7b1979b739e70706f4a3d2"