File tree Expand file tree Collapse file tree 1 file changed +31
-1
lines changed
Expand file tree Collapse file tree 1 file changed +31
-1
lines changed Original file line number Diff line number Diff line change 1919 run : mvn -B install -DskipTests
2020 - name : Create Tag
2121 run : |
22- echo "RELEASE_TAG=`cat ./src/main/resources/.version`" >> $GITHUB_ENV
22+ RELEASE_TAG=$(cat ./src/main/resources/.version)
23+ RELEASE_VER=${RELEASE_TAG#v}
24+ echo "RELEASE_TAG=$RELEASE_TAG" >> $GITHUB_ENV
25+ echo "RELEASE_VER=$RELEASE_VER" >> $GITHUB_ENV
26+ - name : Compute SHA256
27+ id : sha
28+ run : |
29+ FILE=./target/redis-rdb-cli-release.tar.gz
30+ SHA256=$(shasum -a 256 "$FILE" | awk '{print $1}')
31+ echo "SHA256=$SHA256" >> $GITHUB_ENV
32+ - name : Update Homebrew Tap
33+ env :
34+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
35+ run : |
36+ # Clone tap repo
37+ git clone https://x-access-token:${GITHUB_TOKEN}@github.com/leonchen83/homebrew-redis-rdb-cli.git
38+ cd homebrew-redis-rdb-cli
39+
40+ FORMULA_FILE=Formula/redis-rdb-cli.rb
41+
42+ # Update formula fields
43+ sed -i "s|url \".*\"|url \"https://github.com/leonchen83/redis-rdb-cli/releases/download/${RELEASE_TAG}/redis-rdb-cli-release.tar.gz\"|" $FORMULA_FILE
44+ sed -i "s|version \".*\"|version \"${RELEASE_VER}\"|" $FORMULA_FILE
45+ sed -i "s|sha256 \".*\"|sha256 \"${SHA256}\"|" $FORMULA_FILE
46+
47+ # Commit & push
48+ git config user.name "github-actions"
49+ git config user.email "[email protected] " 50+ git add $FORMULA_FILE
51+ git commit -m "Update redis-rdb-cli to ${RELEASE_VER}"
52+ git push origin main
2353 - name : Create Release
2454 id : create_release
2555 uses : ncipollo/release-action@v1
You can’t perform that action at this time.
0 commit comments