Skip to content

Commit

Permalink
feat: ES-56 Add homebrew for macos update (#74)
Browse files Browse the repository at this point in the history
* feat: ES-56 Add homebrew for macos update

feat: ES-56 Fix build

feat: ES-56 Fix build

* feat: ES-56 Cleanup
  • Loading branch information
matiasdaloia authored Jan 2, 2025
1 parent 522da80 commit c106f0f
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,42 @@ jobs:
- name: Build Mac zip file
shell: bash
run: |
cd dist && zip ${{env.ARTIFACT_NAME_PREFIX}}-mac.zip *.dmg
cd dist && zip "${{env.ARTIFACT_NAME_PREFIX}}-mac.zip" *.dmg
- name: Calculate ZIP SHA256
run: |
APP_VERSION=$(git tag --sort=-version:refname | head -n 1)
ZIP_PATH="dist/${{ env.ARTIFACT_NAME_PREFIX }}-mac.zip"
SHA256=$(shasum -a 256 "$ZIP_PATH" | awk '{print $1}')
echo "ZIP_SHA256=$SHA256" >> $GITHUB_ENV
echo "ZIP SHA256: $SHA256"
- name: Checkout Homebrew Tap
uses: actions/checkout@v4
with:
repository: scanoss/homebrew-dist
path: homebrew-dist
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}

- name: Update Cask Formula
run: |
APP_VERSION=$(git tag --sort=-version:refname | head -n 1)
APP_VERSION=${APP_VERSION#v} # Remove 'v' prefix if present
sed -i '' \
-e "s/version \".*\"/version \"${APP_VERSION}\"/" \
-e "s/sha256 \".*\"/sha256 \"${ZIP_SHA256}\"/" \
homebrew-dist/Casks/scanoss-code-compare.rb
- name: Commit and Push Formula Update
run: |
cd homebrew-dist
git config user.name "SCANOSS Bot"
git config user.email "[email protected]"
git add Casks/scanoss-code-compare.rb
git commit -m "Update scanoss-code-compare to ${APP_VERSION}"
git push
- uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit c106f0f

Please sign in to comment.