-
Notifications
You must be signed in to change notification settings - Fork 38
54 lines (48 loc) · 1.76 KB
/
check-token-lists.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
name: Check Token List
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
check-and-update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Repo
uses: ./tools/github/setup-repo
- name: Generate new token list
run: bun generate:tokens
- name: Push Token List Changes
id: commit
uses: devops-infra/action-commit-push@0bb59c279dd1de9fe022ab2764fd30a39c6a1367
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
add_timestamp: false
commit_prefix: "[TOKENS]"
commit_message: "chore: automatic tokenlist update 🤖"
target_branch: bot/token-list-update
- name: Publish Token List
if: ${{ steps.commit.outputs.files_changed != '' }}
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
cp .npmrc.prod ./packages/swapkit/tokens/.npmrc
bun changeset pre exit
bun changeset version --snapshot nightly
cd packages/swapkit/tokens
npm config list --no-workspaces
npm publish --no-workspaces
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Run the Action
if: success()
uses: devops-infra/action-pull-request@e66e2ba93519dc63b9884a26e620e2fd0cffab2c
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
source_branch: ${{ steps.commit.outputs.branch_name }}
target_branch: develop
title: "[Bot] Update Token List"
label: core
get_diff: true