chore(main): release fork-diff 0.6.2 #60
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: Fork Diff Preview | |
env: | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_FORK_DIFF }} | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
paths: | |
- "packages/fork-diff/**" | |
branches-ignore: | |
- release-please--branches--** | |
jobs: | |
deploy-fork-diff-preview: | |
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }} | |
runs-on: [arc-runner-set] | |
steps: | |
- name: Install Git | |
run: sudo apt-get update && sudo apt-get install -y git | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install pnpm dependencies | |
uses: ./.github/actions/install-pnpm-dependencies | |
- name: Install Vercel CLI | |
run: pnpm add --global vercel@latest | |
- name: Pull Vercel Environment Information | |
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Read tag version from JSON | |
run: | | |
echo "TAG_VERSION=$(jq -r '.tagVersion' packages/fork-diff/version_config.json)" >> $GITHUB_ENV | |
- name: Clone forkdiff | |
run: git clone https://github.com/protolambda/forkdiff.git | |
- name: Clone taiko-geth | |
run: git clone https://github.com/taikoxyz/taiko-geth.git | |
- name: Clone go-ethereum | |
run: git clone --branch ${{ env.TAG_VERSION }} https://github.com/ethereum/go-ethereum.git | |
- name: Replace tag version in configuration file | |
run: | | |
sed -i "s/{{ TAG_VERSION }}/${{ env.TAG_VERSION }}/g" packages/fork-diff/fork.yaml | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22.0 | |
- name: Generate index.html with forkdiff | |
run: | | |
cat packages/fork-diff/fork.yaml | |
cp packages/fork-diff/fork.yaml forkdiff/fork.yaml | |
cd forkdiff | |
go run main.go -repo ../taiko-geth/ -upstream-repo ../go-ethereum/ | |
- name: Move generated index.html to vercel project root | |
run: | | |
mv forkdiff/index.html packages/fork-diff/index.html | |
- name: Deploy Project Artifacts to Vercel | |
run: vercel --token=${{ secrets.VERCEL_TOKEN }} |