@@ -29,16 +29,16 @@ jobs:
2929 - name : Create tarball
3030 run : |
3131 VERSION=${{ steps.version.outputs.version }}
32- mkdir -p release/macos -free-${VERSION}
33- cp bin/free release/macos -free-${VERSION}/
34- cp README.md LICENSE release/macos -free-${VERSION}/
35- cd release && tar -czvf macos -free-${VERSION}-darwin-arm64.tar.gz macos -free-${VERSION}
32+ mkdir -p release/mac -free-${VERSION}
33+ cp bin/free release/mac -free-${VERSION}/
34+ cp README.md LICENSE release/mac -free-${VERSION}/
35+ cd release && tar -czvf mac -free-${VERSION}-darwin-arm64.tar.gz mac -free-${VERSION}
3636
3737 - name : Calculate SHA256
3838 id : sha
3939 run : |
4040 VERSION=${{ steps.version.outputs.version }}
41- SHA256=$(shasum -a 256 release/macos -free-${VERSION}-darwin-arm64.tar.gz | cut -d ' ' -f 1)
41+ SHA256=$(shasum -a 256 release/mac -free-${VERSION}-darwin-arm64.tar.gz | cut -d ' ' -f 1)
4242 echo "sha256=$SHA256" >> $GITHUB_OUTPUT
4343 echo "SHA256: $SHA256"
4444
@@ -83,12 +83,11 @@ jobs:
8383 VERSION : ${{ needs.build.outputs.version }}
8484 SHA256 : ${{ needs.build.outputs.sha256 }}
8585 run : |
86- mkdir -p homebrew-tap/Formula
87- cat > homebrew-tap/Formula/macos-free.rb << 'EOF'
86+ cat > mac-free.rb << 'EOF'
8887 class MacosFree < Formula
8988 desc "A 'free' command replacement for macOS - displays memory usage like Linux free"
9089 homepage "https://github.com/techquestsdev/mac-free"
91- url "https://github.com/techquestsdev/mac-free/releases/download/${VERSION}/macos -free-${VERSION}-darwin-arm64.tar.gz"
90+ url "https://github.com/techquestsdev/mac-free/releases/download/${VERSION}/mac -free-${VERSION}-darwin-arm64.tar.gz"
9291 sha256 "${SHA256}"
9392 license "MIT"
9493
@@ -103,19 +102,18 @@ jobs:
103102 EOF
104103
105104 # Replace variables in the formula
106- sed -i "s|\${VERSION}|${VERSION}|g" homebrew-tap/Formula/macos -free.rb
107- sed -i "s|\${SHA256}|${SHA256}|g" homebrew-tap/Formula/macos -free.rb
105+ sed -i "s|\${VERSION}|${VERSION}|g" mac -free.rb
106+ sed -i "s|\${SHA256}|${SHA256}|g" mac -free.rb
108107
109- cat homebrew-tap/Formula/macos -free.rb
108+ cat mac -free.rb
110109
111110 - name : Commit and push formula
112111 env :
113112 HOMEBREW_TOKEN : ${{ secrets.HOMEBREW_TOKEN }}
114113 run : |
115- cd homebrew-tap
116114 git config user.name "github-actions[bot]"
117115 git config user.email "github-actions[bot]@users.noreply.github.com"
118116 git remote set-url origin https://x-access-token:${HOMEBREW_TOKEN}@github.com/techquestsdev/homebrew-tap.git
119- git add Formula/macos -free.rb
120- git commit -m "Update macos -free to ${{ needs.build.outputs.version }}" || echo "No changes to commit"
117+ git add mac -free.rb
118+ git commit -m "Update mac -free to ${{ needs.build.outputs.version }}" || echo "No changes to commit"
121119 git push
0 commit comments