Skip to content

Commit

Permalink
chore(ci/cd): add evolve ci
Browse files Browse the repository at this point in the history
  • Loading branch information
atticusofsparta committed Aug 2, 2024
1 parent 8863628 commit 1fe532b
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/evolve-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Evolve Devnet ANT Registry

on:
push:
branches:
- main

jobs:
# TODO: add unit tests using bused
evolve:
runs-on: ubuntu-latest
environment: development
steps:
- uses: actions/checkout@v4
- uses: actions/[email protected]
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- run: yarn --frozen-lockfile
- run: yarn evolve
env:
WALLET: ${{ secrets.WALLET }}
REGISTRY_ID: ${{ secrets.REGISTRY_ID }}
23 changes: 23 additions & 0 deletions .github/workflows/evolve-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Evolve Devnet ANT Registry

on:
push:
branches:
- main

jobs:
# TODO: add unit tests using bused
evolve:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- uses: actions/[email protected]
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- run: yarn --frozen-lockfile
- run: yarn evolve
env:
WALLET: ${{ secrets.WALLET }}
REGISTRY_ID: ${{ secrets.REGISTRY_ID }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"scripts": {
"build": "node tools/bundle-aos.js",
"test": "yarn build && node --test --test-concurrency 1 --experimental-wasm-memory64 **/*.test.js",
"observe": "node tools/observe.js"
"evolve": "yarn build && node tools/evolve.js"
},
"devDependencies": {
"@ar.io/sdk": "^2.1.0-alpha.2",
Expand Down
15 changes: 15 additions & 0 deletions tools/evolve.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { AOProcess, createAoSigner } from '@ar.io/sdk';
import { BUNDLED_AOS_LUA } from './constants';

const registryId = process.env.REGISTRY_ID;
const wallet = JSON.parse(process.env.WALLET);
const process = new AOProcess({ processId: registryId });

const signer = createAoSigner(new ArweaveSigner(wallet));

const evolveResult = await process.send({
tags: [{ name: 'Action', value: 'Eval' }],
data: BUNDLED_AOS_LUA,
signer,
});
console.log(`Evolve result: ${evolveResult}`);

0 comments on commit 1fe532b

Please sign in to comment.