New test token #22
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: Merge tokens and upgrade version | |
on: | |
merge_group: | |
pull_request: | |
types: | |
- closed | |
jobs: | |
publish-tokens: | |
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: yarn install | |
- name: Fetch Previous Commit's token-list.json | |
run: | | |
echo "Current Git branch: $(git rev-parse --abbrev-ref HEAD)" | |
echo "Fetching token-list.json from previous commit:" | |
git show HEAD~1:src/token-list.json > src/base-token-list.json | |
- name: Merge tokens and upgrade version | |
run: yarn versionUpgrade | |
- name: Commit and Push Update | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
git add src/token-list.json | |
git commit -m "chore: bump token list version" | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |