Skip to content

log the commits

log the commits #4

Workflow file for this run

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: |
echo "Current Git branch: $(git rev-parse --abbrev-ref HEAD)"
echo "Fetching token-list.json from previous commit:"
git log
git show HEAD~1:src/token-list.json
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 }}