Skip to content

Commit

Permalink
chore: build script
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlementlegen committed Oct 7, 2024
1 parent 255e35c commit bbadab9
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 8 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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
39 changes: 39 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ static/dist
junit.xml
coverage
test-dashboard.md
dist
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
9 changes: 1 addition & 8 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit bbadab9

Please sign in to comment.