Merge pull request #3 from sonicdex/development #2
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: Upgrade Version After Merge | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
version-upgrade: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: yarn install | |
# Step 4: Fetch previous token-list.json (before the merge) | |
- name: Fetch Previous Commit's token-list.json | |
run: | | |
git show HEAD~1:src/token-list.json > src/base-token-list.json | |
- name: Calculate Version Upgrade | |
run: yarn versionUpgrade | |
- name: Commit and Push Version 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 }} |