Fetch token list #144
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Fetch token list | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
jobs: | |
fetch-list: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use node_modules cache | |
uses: actions/cache@v2 | |
id: npm-cache | |
with: | |
path: | | |
node_modules | |
key: npm-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} | |
- name: NPM install | |
run: npm install | |
if: steps.npm-cache.outputs.cache-hit != 'true' | |
- name: Sync Conflux Token List | |
id: sync-token-list-conflux | |
run: | | |
node node_modules/puppeteer/install.js && npm run cli generate -- --include=1030 && npm run lint-fix | |
- name: Sync Base Token List | |
id: sync-token-list-base | |
run: | | |
npm run cli generate -- --include=8453 --static && npm run lint-fix | |
- name: Sync Solana Token List | |
id: sync-token-list-solana | |
run: | | |
node node_modules/puppeteer/install.js && npm run cli generate -- --include=solana && npm run lint-fix | |
- name: Sync OP Token List | |
id: sync-token-list-op | |
run: | | |
node node_modules/puppeteer/install.js && npm run cli generate -- --include=10 && npm run lint-fix | |
- name: Sync Aurora Token List | |
id: sync-token-list-aurora | |
run: | | |
node node_modules/puppeteer/install.js && npm run cli generate -- --include=1313161554 && npm run lint-fix | |
- name: Sync Gnosis Token List | |
id: sync-token-list-gnosis | |
run: | | |
node node_modules/puppeteer/install.js && npm run cli generate -- --include=100 && npm run lint-fix | |
- name: Sync Fantom Token List | |
id: sync-token-list-fantom | |
run: | | |
node node_modules/puppeteer/install.js && npm run cli generate -- --include=250 && npm run lint-fix | |
- name: Sync Avalanche Token List | |
id: sync-token-list-avalanche | |
run: | | |
node node_modules/puppeteer/install.js && npm run cli generate -- --include=43114 && npm run lint-fix | |
- name: Sync Arbitrum Token List | |
id: sync-token-list-arbitrum | |
run: | | |
node node_modules/puppeteer/install.js && npm run cli generate -- --include=42161 && npm run lint-fix | |
- name: Sync Scroll Token List | |
id: sync-token-list-scroll | |
run: | | |
npm run cli generate -- --include=534352 --static && npm run lint-fix | |
- name: Sync Polygon Token List | |
id: sync-token-list-polygon | |
run: | | |
node node_modules/puppeteer/install.js && npm run cli generate -- --include=137 && npm run lint-fix | |
- name: Sync BSC Token List | |
id: sync-token-list-bsc | |
run: | | |
node node_modules/puppeteer/install.js && npm run cli generate -- --include=56 && npm run lint-fix | |
- name: Sync ETH Token List | |
id: sync-token-list-eth | |
run: | | |
node node_modules/puppeteer/install.js && npm run cli generate -- --include=1 && npm run lint-fix | |
- name: Sync X1 Testnet token list | |
id: sync-token-list-x1-testnet | |
run: | | |
npm run cli generate -- --include=195 && npm run lint-fix | |
- name: Prettier Check | |
run: npm run prettier | |
- name: Get Package Version | |
id: package-version | |
uses: martinbeentjes/npm-get-version-action@master | |
- name: Tag Package Version | |
run: git tag v${{ steps.package-version.outputs.current-version }} | |
- name: Create Release Package | |
uses: montudor/action-zip@v1 | |
with: | |
args: | |
zip -qq -r v${{ steps.package-version.outputs.current-version }}.zip dist/v${{ | |
steps.package-version.outputs.current-version }} | |
- name: Upload Latest Release | |
uses: actions/upload-artifact@v2 | |
with: | |
name: v${{ steps.package-version.outputs.current-version }}.zip | |
path: v${{ steps.package-version.outputs.current-version }}.zip | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: v${{ steps.package-version.outputs.current-version }}.zip | |
asset_name: v${{ steps.package-version.outputs.current-version }}.zip | |
tag: v${{ steps.package-version.outputs.current-version }} | |
overwrite: true | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist | |
keep_files: true | |
cname: tokens.r2d2.to |