Merge pull request #1161 from HarryHeres/feature/homebrew-tap

Adding Homebrew
This commit is contained in:
mauro 🤙
2024-09-01 21:06:30 +02:00
committed by GitHub
4 changed files with 86 additions and 0 deletions

View File

@@ -511,4 +511,47 @@ jobs:
git-token: ${{ secrets.DEPLOY_KEY }}
delete-branch: true
release-homebrew:
if: ${{ github.event.inputs.create_release == 'true' }}
permissions: write-all
name: Homebrew release
needs: [release, mac, build-data]
runs-on: ubuntu-latest
steps:
- name: Clone flatpak repo
uses: actions/checkout@v4
with:
repository: flathub/io.github.zen_browser.zen
token: ${{ secrets.DEPLOY_KEY }}
- name: Setup git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Download macOS ARM build
uses: actions/download-artifact@v4
with:
name: zen.macos-aarch64.dmg
- name: Download macOS x64 build
uses: actions/download-artifact@v4
with:
name: zen.macos-x64.dmg
- name: Update zen-browser Cask
run: sh .github/workflows/src/update-homebrew.sh
- name: Clean up
run: |
rm -rf zen.macos-x64.dmg
rm -rf zen.macos-aarch64.dmg
- uses: stefanzweifel/git-auto-commit-action@v4
if: ${{ github.event.inputs.update_version == 'true' }}
with:
commit_message: 🔖 Update version to ${{ steps.data.outputs.version }} for homebrew!
commit_user_name: Zen Browser Robot
commit_user_email: zen-browser-bot@users.noreply.github.com

View File

@@ -0,0 +1,7 @@
latest_version=$(git describe --tags --abbrev=0)
sed -i "s/version(.*)/version('${latest_version}')/" ./Casks/zen-browser.rb
sha_x64=$(shasum -a 256 zen.macos-x64.dmg)
sha_arm=$(shasum -a 256 zen.macos-aarch64.dmg)
sed -i "s/sha256(.*)/sha256(arm:'${sha_arm}', intel:'${sha_x64}')/" ./Casks/zen-browser.rb

26
Casks/zen-browser.rb Normal file
View File

@@ -0,0 +1,26 @@
cask("zen-browser") do
arch(arm: "aarch64", intel: "x64")
version("1.0.0-a.34")
sha256(arm: "6cc6e72c4a6a11d0139489d438ccf811715e170eebc01da739da32ace2580747", intel: "b9cb48f21a4ee39f3f3ae2361b9b0a55ae7219638cf798e1483c0eb8cf4660a6")
url("https://github.com/zen-browser/desktop/releases/download/#{version}/zen.macos-#{arch}.dmg")
name("Zen Browser")
desc("Beautifully designed, privacy-focused browser packed with awesome features")
homepage("https://zen-browser.app/")
livecheck do
url(:stable)
regex(/[0-9].*-a.[0-9]*/i)
end
zap trash: [
"~/Library/Preferences/org.mozilla.com.zen.browser.plist",
"~/Library/Saved Application State/org.mozilla.com.zen.browser.savedState"
]
app("Zen Browser.app")
postflight do
system("xattr -c '/Applications/Zen Browser.app/'")
end
end

View File

@@ -33,6 +33,16 @@ Zen is built with performance in mind, and we have optimized the browser to be a
* Checkout the latest [performance benchmarks](https://docs.zen-browser.app/benchmarks)!
# Installation
## MacOS
You can install the Zen Browser using Homebrew:
```
brew tap zen-browser/browser https://github.com/zen-browser/desktop.git
brew install zen-browser
```
# Core Components
Some components used by @zen-browser as an attempt to make firefox forks a better place. You can find them [here](https://github.com/zen-browser/components).