File tree 1 file changed +23
-3
lines changed
1 file changed +23
-3
lines changed Original file line number Diff line number Diff line change 54
54
goarch : ${{ matrix.goarch }}
55
55
goversion : ${{ steps.set_goversion.outputs.goversion }}
56
56
57
- # homebrew:
58
- # runs-on: ubuntu-latest
59
- # run: |
57
+ homebrew :
58
+ runs-on : ubuntu-latest
59
+ steps :
60
+ - name : clone tap
61
+ run : |
62
+ # Clone the repository
63
+ git clone https://github.com/jesses-code-adventures/homebrew-tap
64
+ cd homebrew-tap
65
+
66
+ # Use sed to replace version number in-place without creating a backup file
67
+ sed -i -E "s/v[0-9]+\.[0-9]+\.[0-9]+(-lw)?/${{ env.TAG_NAME }}/g" Formula/excavator.rb
68
+
69
+ # Extract the new URL from the file
70
+ URL=$(grep "url \"" Formula/excavator.rb | sed 's/.*url "\(.*\)".*/\1/')
71
+
72
+ # Fetch the tarball and compute its SHA256 hash
73
+ SHA=$(curl -Ls "$URL" | shasum -a 256 | cut -d ' ' -f 1)
60
74
75
+ # Use sed to replace the sha256 line in-place
76
+ sed -i "s/sha256 .*/sha256 \"$SHA\"/" Formula/excavator.rb
61
77
78
+ # Add changes, commit, and push back to the repository
79
+ git add Formula/excavator.rb
80
+ git commit -m "Update excavator to ${{ env.TAG_NAME }}"
81
+ git push origin main # Adjust as needed to your branch name
You can’t perform that action at this time.
0 commit comments