Skip to content

feat: add missing scripts to generation workflow #32

feat: add missing scripts to generation workflow

feat: add missing scripts to generation workflow #32

Workflow file for this run

name: Regenerate Asset Data and PR
on:
# Allows manual triggering if we ever want to
pull_request:
workflow_dispatch:
schedule:
- cron: '0 9 * * 1,4' # Twice a week - 9AM UTC on Monday and Thursday
jobs:
regenerate-and-create-pr:
runs-on: ubuntu-latest
steps:
- name: Checkout monkey-patched
uses: actions/checkout@v3
with:
ref: feat_improve_asset_gen
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Yarn Install
run: yarn install --immutable
- name: Setup env
run: yarn env dev
- name: Build Packages
run: yarn build:packages
# - name: Generate asset data
# env:
# ZERION_API_KEY: ${{ secrets.ZERION_API_KEY }}
# run: yarn run generate:asset-data
- name: Generate THOR assets
run: yarn run generate:thor-asset-map
- name: Generate THOR long-tail assets
run: yarn run generate:thor-longtail-tokens
- name: Generate color map
run: yarn run generate:color-map
- name: Create new feature branch
run: git checkout -B feat_regenerate_asset_data
- name: Commit changes
run: |
git checkout -B feat_regenerate_asset_data
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
CURRENT_DATE=$(date +'%m/%d/%Y')
git diff --staged --quiet || git commit -m "feat: regenerate asset data $CURRENT_DATE"
git push -u origin feat_regenerate_asset_data -f
- name: Create Pull Request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
CURRENT_DATE=$(date +'%m/%d/%Y')
gh pr create --base develop --head feat_regenerate_asset_data --title "feat: regenerate asset data $CURRENT_DATE" --body "Generated from CI."