-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ES-56 Add homebrew for macos update (#74)
* 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
1 parent
522da80
commit c106f0f
Showing
1 changed file
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|