Skip to content

Commit 23b2ed4

Browse files
ci: combine replacement code
1 parent b4e9d1f commit 23b2ed4

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

.github/workflows/release.yml

+1-10
Original file line numberDiff line numberDiff line change
@@ -71,22 +71,13 @@ jobs:
7171
run: |
7272
git clone git@github.com:jesses-code-adventures/homebrew-tap.git
7373
74-
- name: replace version tag in url
74+
- name: replace url and sha
7575
run: |
7676
cd homebrew-tap
77-
ls
7877
sed -i -E "s/v[0-9]+\.[0-9]+\.[0-9]+(-lw)?/${{ needs.check_tag.outputs.is_version_tag }}/g" Formula/excavator.rb
79-
- name: replace sha256 checksum
80-
run: |
81-
# Extract the new URL from the file
8278
URL=$(grep "url \"" Formula/excavator.rb | sed 's/.*url "\(.*\)".*/\1/')
83-
84-
# Fetch the tarball and compute its SHA256 hash
8579
SHA=$(curl -Ls "$URL" | shasum -a 256 | cut -d ' ' -f 1)
86-
87-
# Use sed to replace the sha256 line in-place
8880
sed -i "s/sha256 .*/sha256 \"$SHA\"/" Formula/excavator.rb
89-
9081
- name: set uesr email and name
9182
run: |
9283
git config user.email "jesse@negativespacesounds.com"

0 commit comments

Comments
 (0)