File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Links
2+
3+ on : push
4+
5+ # on:
6+ # repository_dispatch:
7+ # workflow_dispatch:
8+ # schedule:
9+ # - cron: "00 18 * * *"
10+
11+ jobs :
12+ bumpLycheeVersion :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v5
16+
17+ - name : Bump lychee version
18+ run : ./bump-lychee.sh
19+ env :
20+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ POSITION=1 # 0 is nightly, 1 is latest stable release
4+ LATEST=$( curl " https://api.github.com/repos/lycheeverse/lychee/releases" | jq -r " .[$POSITION ] | .name" )
5+ FILE=src/generate/lychee-version.ts
6+
7+ sed -i -e " s/LYCHEE_VERSION = \" [^\" ]*\" /LYCHEE_VERSION = \" $LATEST \" /" $FILE
8+
9+ if git status --porcelain | grep $FILE ; then
10+ echo New version found: $LATEST
11+ git add $FILE
12+ BRANCH=" bump-$LATEST "
13+ MESSAGE=" Bump lychee: $LATEST "
14+ git checkout -b $BRANCH
15+ git add $FILE
16+ git config user.name " lychee bot"
17+ git config user.email " noreply@lychee.cli.rs"
18+ git commit --message " $MESSAGE "
19+ git push -u origin $BRANCH
20+ gh pr create -B master -H $BRANCH --title " $MESSAGE " --body ' Created by Github action'
21+ else
22+ echo Version is up to date
23+ fi
You can’t perform that action at this time.
0 commit comments