Skip to content

Lotus version update automation fix #29

Lotus version update automation fix

Lotus version update automation fix #29

Workflow file for this run

name: Update Lotus Version
on:
workflow_dispatch:
pull_request:
types: [opened, reopened, synchronize]
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Get latest Lotus version
id: get-version
run: |
LATEST_VERSION=$(node get-latest-lotus-version.js)
echo "LATEST_VERSION=$LATEST_VERSION" >> $GITHUB_ENV
echo "TAG_NAME=v$LATEST_VERSION" >> $GITHUB_ENV
- name: Run update script
run: |
node update-versions.js ${{ env.LATEST_VERSION }}
- name: Ensure branch exists
run: |
git fetch origin
if ! git show-ref --verify --quiet refs/heads/update-lotus-version; then
git checkout -b update-lotus-version
else
git checkout update-lotus-version
fi
- name: Configure Git
run: |
git config user.name "GitHub Actions Bot"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'Chore: update Lotus version references to ${{ env.LATEST_VERSION }}'
title: 'Chore: update Lotus version references to ${{ env.LATEST_VERSION }}'
body: |
Automated PR to update Lotus version references to ${{ env.LATEST_VERSION }}
This PR was automatically generated by GitHub Actions.
branch: update-lotus-version
base: main
delete-branch: true