-
Notifications
You must be signed in to change notification settings - Fork 8
59 lines (47 loc) · 1.67 KB
/
solana-tokenlist.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Update Solana Unified Tokens List
on:
workflow_dispatch:
schedule:
# At 00:00 every day.
- cron: '0 0 * * *'
env:
TOKEN_LISTS_ACTIONS_OR_CI_BUILD: true
DAPP_RADAR_PROJECT_ID: ${{ secrets.DAPP_RADAR_PROJECT_ID }}
DAPP_RADAR_API_KEY: ${{ secrets.DAPP_RADAR_API_KEY }}
jobs:
generate:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Extract branch name
shell: bash
run: echo "GITHUB_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
id: extract_branch
- name: 'Configure git'
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- run: brew install librsvg libimagequant pkg-config
- run: npm install -g yarn
- run: yarn
- run: yarn gen:solana
env:
SOLANA_MAINNET_RPC_URL: ${{ secrets.SOLANA_MAINNET_RPC_URL }}
TRUSTED_TOKEN_LIST_URL: https://cdn.jsdelivr.net/gh/brave/token-lists@${{ steps.extract_branch.outputs.GITHUB_BRANCH }}/data/solana/trusted-tokenlist.json
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update Solana UTL
file_pattern: 'data/solana/tokenlist.json'
- name: 'Bump patch version'
run: npm version patch
- run: yarn start
- run: git push
- run: npm run publish-token-package
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}