Updating MetaMask x Ledger section with more details #25
This file contains hidden or 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: Update Lotus Version | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: [opened, reopened] | |
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: | | |
# Get all releases and find the first one starting with 'v' | |
RELEASE_INFO=$(curl -s "https://api.github.com/repos/filecoin-project/lotus/releases/latest") | |
# Find first tag that starts with 'v' but not 'miner' | |
TAG_NAME=$(echo "$RELEASE_INFO" | jq -r 'select(.tag_name | startswith("v") and (contains("miner") | not)) | .tag_name') | |
# Extract version number (remove 'v' prefix) | |
LATEST_VERSION=$(echo $TAG_NAME | sed 's/^v//') | |
echo "LATEST_VERSION=$LATEST_VERSION" >> $GITHUB_ENV | |
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV | |
- name: Run update script | |
run: | | |
node update-versions.js ${{ env.LATEST_VERSION }} | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
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 |