PR changes

This commit is contained in:
HarryHeres
2024-09-01 20:04:36 +02:00
parent cf9b266bca
commit 467b444535
3 changed files with 54 additions and 7 deletions

View File

@@ -460,4 +460,56 @@ 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: 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: Commit changes
run: |
git add Casks/zen-browser.rb
git commit -m "Updated Homebrew Cask"
- name: Create pull request
uses: peter-evans/create-pull-request@v6
env:
GIT_TRACE: 1
GIT_CURL_VERBOSE: 1
with:
token: ${{ secrets.DEPLOY_KEY }}
commit-message: 🚀 Update to version ${{ needs.build-data.outputs.version }}
title: 🚀 Update to version ${{ needs.build-data.outputs.version }}
body: |
This PR updates the Zen Browser Homebrew Cask to version ${{ needs.build-data.outputs.version }}.
@mauro-balades
branch: brew-update-to-${{ needs.build-data.outputs.version }}
base: master
git-token: ${{ secrets.DEPLOY_KEY }}
delete-branch: true
- name: Clean up
run: |
rm -rf zen.macos-aarch64.dmg
rm -rf zen.macos-aarch64.dmg

View File

@@ -148,6 +148,3 @@ jobs:
with:
name: macos_update_manifest_${{ matrix.arch }}
path: ./dist/update
- name: Update Homebrew
run: sh .github/workflows/src/update-homebrew.sh

View File

@@ -1,9 +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
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