Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/zen-browser/desktop into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
mauro-balades committed Jan 15, 2025
2 parents 1aa00bf + d757c36 commit fd09bd2
Show file tree
Hide file tree
Showing 57 changed files with 1,066 additions and 623 deletions.
14 changes: 0 additions & 14 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,3 @@ body:
label: Relevant log output if applicable
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: textarea
id: support
attributes:
label: Data from about:support if applicable (click on the "Copy text to clipboard" button)
description: Please copy and paste about:support data if you think it might be relevant. This will help us understand your environment.
value: |
<details>
<summary>about:support</summary>
<!-- Please leave one blank line below for enabling the code block rendering. -->
```
Select this line and paste your about:support clipboard
```
</details>
102 changes: 69 additions & 33 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,30 @@ jobs:
echo "GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}"
echo "GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}"
start-self-host:
runs-on: ubuntu-latest
needs: debug-inputs
steps:
- name: Download aws-cli
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install --update
- name: Start self-hosted runner
if: ${{ inputs.create_release && inputs.update_branch == 'release' }}
run: |
echo "Starting self-hosted runner"
echo "${{ secrets.SELF_HOSTED_RUNNER_START_SCRIPT }}" | base64 -d > start.sh
sudo chmod +x start.sh
bash ./start.sh
- name: Remove self-hosted runner script
if: always() && ${{ inputs.create_release && inputs.update_branch == 'release' }}
run: |
echo "Removing self-hosted runner script"
rm start.sh || true
check-build-is-correct:
runs-on: ubuntu-latest
needs: [debug-inputs]
Expand All @@ -65,6 +89,7 @@ jobs:
token: ${{ secrets.DEPLOY_KEY }}

- name: Check if correct branch
if: ${{ inputs.create_release }}
run: |
echo "Checking if we are on the correct branch"
git branch
Expand All @@ -78,7 +103,7 @@ jobs:
fi
if [[ $(git branch --show-current) != $branch ]]; then
echo ">>> Branch mismatch"
exit 1
# exit 1
else
echo ">>> Branch matches"
fi
Expand Down Expand Up @@ -155,29 +180,9 @@ jobs:
commit_user_email: zen-browser-auto@users.noreply.github.com

lint:
runs-on: ubuntu-latest
uses: ./.github/workflows/code-linter.yml
needs: [build-data]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.DEPLOY_KEY }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- name: Setup pnpm
run: npm install -g pnpm

- name: Install dependencies
run: |
pnpm install
- name: Lint
run: pnpm lint
name: Lint

check-release:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -317,7 +322,7 @@ jobs:
permissions:
contents: write
secrets: inherit
needs: [build-data, windows-step-2]
needs: [build-data, windows-step-2, start-self-host]
with:
build-version: ${{ needs.build-data.outputs.version }}
generate-gpo: false
Expand All @@ -329,7 +334,7 @@ jobs:
permissions:
contents: write
secrets: inherit
needs: [build-data]
needs: [build-data, start-self-host]
with:
build-version: ${{ needs.build-data.outputs.version }}
release-branch: ${{ inputs.update_branch }}
Expand Down Expand Up @@ -386,7 +391,7 @@ jobs:
if [ "${{ inputs.update_branch }}" = "twilight" ]; then
sed -i -e 's/Name=Zen Browser/Name=Zen Twilight/g' AppDir/zen.desktop
sed -i -e 's/StartupWMClass=zen-release/StartupWMClass=zen-twilight/g' AppDir/zen.desktop
sed -i -e 's/StartupWMClass=zen/StartupWMClass=zen-twilight/g' AppDir/zen.desktop
fi
APPDIR=AppDir
Expand Down Expand Up @@ -419,11 +424,36 @@ jobs:
name: zen-${{ matrix.arch }}.AppImage.zsync
path: ./dist/zen-${{ matrix.arch }}.AppImage.zsync

stop-self-hosted:
runs-on: ubuntu-latest
needs: [windows-step-3, linux]
if: always()
steps:
- name: Download aws-cli
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install --update
- name: Stop self-hosted runner
if: ${{ inputs.create_release && inputs.update_branch == 'release' }}
run: |
echo "Stopping self-hosted runner"
echo "${{ secrets.SELF_HOSTED_RUNNER_STOP_SCRIPT }}" | base64 -d > stop.sh
sudo chmod +x stop.sh
bash ./stop.sh > /dev/null 2>&1 &
- name: Remove self-hosted runner script
if: always() && ${{ inputs.create_release && inputs.update_branch == 'release' }}
run: |
echo "Removing self-hosted runner script"
rm stop.sh || true
release:
if: ${{ inputs.create_release || inputs.update_branch == 'twilight' }}
permissions: write-all
name: Release
needs: [build-data, linux, windows-step-3, check-release, mac, appimage, source, lint]
needs: [build-data, linux, windows-step-3, check-release, mac, appimage, source, lint, stop-self-hosted]
runs-on: ubuntu-latest
environment:
name: ${{ inputs.update_branch == 'release' && 'Deploy-Release' || 'Deploy-Twilight' }}
Expand Down Expand Up @@ -590,7 +620,7 @@ jobs:
pwd
ls .
ls ..
mv releases.xml ./flatpak/io.github.zen_browser.zen.metainfo.xml
mv releases.xml ./flatpak/app.zen_browser.zen.metainfo.xml
# output the version to the file
echo -n ${{ needs.build-data.outputs.version }} > ./flatpak/version
Expand All @@ -616,14 +646,19 @@ jobs:
- name: Checkout Flatpak repository
uses: actions/checkout@v4
with:
repository: flathub/io.github.zen_browser.zen
repository: flathub/app.zen_browser.zen
token: ${{ secrets.DEPLOY_KEY }}

- name: Download Linux x86_64 build
uses: actions/download-artifact@v4
with:
name: zen.linux-x86_64.tar.bz2

- name: Download Linux aarch64 build
uses: actions/download-artifact@v4
with:
name: zen.linux-aarch64.tar.bz2

- name: Update repository
uses: actions/checkout@v4
with:
Expand All @@ -645,12 +680,13 @@ jobs:
--flatpak-archive archive.tar \
--version ${{ needs.build-data.outputs.version }} \
--linux-archive zen.linux-x86_64.tar.bz2 \
--output io.github.zen_browser.zen.yml \
--linux-aarch64-archive zen.linux-aarch64.tar.bz2 \
--output app.zen_browser.zen.yml \
--template-root ./zen-browser/flatpak
- name: Commit changes
run: |
git add io.github.zen_browser.zen.yml
git add app.zen_browser.zen.yml
git commit -m "Update to version ${{ needs.build-data.outputs.version }}"
- name: Clean up
Expand All @@ -663,8 +699,8 @@ jobs:
uses: actions/upload-artifact@v4
with:
retention-days: 5
name: io.github.zen_browser.zen.yml
path: ./io.github.zen_browser.zen.yml
name: app.zen_browser.zen.yml
path: ./app.zen_browser.zen.yml

- name: Create pull request
uses: peter-evans/create-pull-request@v7
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/check-candidate-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,9 @@ jobs:
- name: Check out repository
uses: actions/checkout@v2

- name: Fetch JSON Response
run: |
curl -s "https://hg.mozilla.org/releases/mozilla-release/json-tags" > rc-response.json
- name: Check for any updates
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
DISCORD_PING_IDS: ${{ secrets.DISCORD_PING_IDS }}
run: |
python3 scripts/check-rc-response.py || true
python3 scripts/check_rc_response.py
4 changes: 4 additions & 0 deletions .github/workflows/code-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- dev
workflow_dispatch:
workflow_call:
pull_request:
branches:
- dev
Expand All @@ -23,6 +24,9 @@ jobs:
with:
node-version-file: '.nvmrc'

- name: Setup autopep8
run: sudo apt install python3-autopep8

- name: Setup pnpm
run: npm install -g pnpm

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linux-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
permissions:
contents: write
# aarch64 does not need full 16x
runs-on: ${{ (inputs.release-branch == 'release' && matrix.arch == 'x86_64') && 'ubuntu-latest' || 'ubuntu-latest' }}
runs-on: ${{ (inputs.release-branch == 'release' && matrix.arch == 'x86_64') && 'self-hosted' || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
set -x
sudo apt-get update --fix-missing
sudo apt-get update
sudo apt-get install -y dos2unix yasm nasm build-essential libgtk2.0-dev libpython3-dev m4 uuid libasound2-dev libcurl4-openssl-dev libdbus-1-dev libdrm-dev libdbus-glib-1-dev libgtk-3-dev libpulse-dev libx11-xcb-dev libxt-dev xvfb lld llvm
sudo apt-get install -y python3 python3-pip dos2unix yasm nasm build-essential libgtk2.0-dev libpython3-dev m4 uuid libasound2-dev libcurl4-openssl-dev libdbus-1-dev libdrm-dev libdbus-glib-1-dev libgtk-3-dev libpulse-dev libx11-xcb-dev libxt-dev xvfb lld llvm
- name: Configure sccache
uses: actions/github-script@v7
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/src/release-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ set -xe

if command -v apt-get &> /dev/null; then
sudo add-apt-repository ppa:kisak/kisak-mesa
sudo apt update
sudo apt upgrade
sudo apt-get update
sudo apt-get install -y xvfb libnvidia-egl-wayland1 mesa-utils libgl1-mesa-dri
fi

Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/windows-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
windows-build:
name: Build Windows - ${{ matrix.arch }}
# aarch64 does not need full 16x, and we also dont use full LTO when generating GPO
runs-on: ${{ (inputs.release-branch == 'release' && !inputs.generate-gpo && matrix.arch == 'x86_64') && 'ubuntu-latest' || 'ubuntu-latest' }}
runs-on: ${{ (inputs.release-branch == 'release' && !inputs.generate-gpo && matrix.arch == 'x86_64') && 'self-hosted' || 'ubuntu-latest' }}

strategy:
fail-fast: false
Expand Down Expand Up @@ -59,6 +59,7 @@ jobs:
- name: Install dependencies
run: |
pnpm install
sudo apt-get install -y python3 python3-pip dos2unix yasm nasm build-essential libgtk2.0-dev libpython3-dev m4 uuid libasound2-dev libcurl4-openssl-dev libdbus-1-dev libdrm-dev libdbus-glib-1-dev libgtk-3-dev libpulse-dev libx11-xcb-dev libxt-dev xvfb lld llvm
- name: Load Surfer CI setup
run: pnpm surfer ci --brand ${{ inputs.release-branch }} --display-version ${{ inputs.build-version }}
Expand Down Expand Up @@ -89,11 +90,7 @@ jobs:
set -x
mkdir -p ~/win-cross
cd engine/
echo Setup wine
aria2c "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/gecko.cache.level-1.toolchains.v3.linux64-wine.latest/artifacts/public%2Fbuild%2Fwine.tar.zst" -o wine.tar.zst
tar --zstd -xvf wine.tar.zst -C ~/win-cross
rm wine.tar.zst
echo Setup Visual Studio
sudo add-apt-repository ppa:savoury1/backports
sudo apt-get update
sudo apt-get install -y python3-pip autoconf \
autoconf2.13 \
Expand Down Expand Up @@ -134,7 +131,13 @@ jobs:
uuid-dev \
wget \
zip \
zlib1g-dev
zlib1g-dev \
aria2
echo Setup wine
aria2c "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/gecko.cache.level-1.toolchains.v3.linux64-wine.latest/artifacts/public%2Fbuild%2Fwine.tar.zst" -o wine.tar.zst
tar --zstd -xvf wine.tar.zst -C ~/win-cross
rm wine.tar.zst
echo Setup Visual Studio
./mach python --virtualenv build taskcluster/scripts/misc/get_vs.py build/vs/vs2022.yaml ~/win-cross/vs2022
- name: Bootstrap
Expand Down
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ engine/
**/*.xhtml
**/*.inc.xhtml
**/*.bundle.min.js
**/*.min.js
**/*.min.mjs

**/*.svg

surfer.json

src/browser/app/profile/*.js
pnpm-lock.yaml

Expand Down
2 changes: 1 addition & 1 deletion AppDir/zen.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Exec=zen %u
Icon=zen
Type=Application
MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;application/x-xpinstall;application/pdf;application/json;
StartupWMClass=zen-release
StartupWMClass=zen
Categories=Network;WebBrowser;
StartupNotify=true
Terminal=false
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@

## 🖥️ Compatibility

Zen is currently built using firefox version `134.0`! 🚀
Zen is currently built using firefox version `134.0.1`! 🚀

- [`Zen Twilight`](https://zen-browser.app/download?twilight) - Is currently built using firefox version `RC 134.0.1`!
- Check out the latest [release notes](https://zen-browser.app/release-notes)!
- Part of our mission is to keep Zen up-to-date with the latest version of Firefox, so you can enjoy the latest features and security updates!

Expand All @@ -43,7 +44,7 @@ We keep track of how many issues are closed at the end of the month in [docs/iss

### Versioning

Zen uses [Semantic Versioning](https://semver.org/) for versioning. Meaning, versions are displayed as `a.b-c.d` where:
Zen uses [Semantic Versioning](https://semver.org/) for versioning. Meaning, versions are displayed as `a.bc.d` where:

- `a` is the major version
- `b` is the minor version
Expand Down Expand Up @@ -131,7 +132,7 @@ Zen couldn't be in its current state without the help of these amazing projects!

### 🖥️ Comparison with other browsers

Thanks everyone for making zen stand out amongs these giants!
Thanks everyone for making zen stand out among these giants!

[![Star History Chart](https://api.star-history.com/svg?repos=zen-browser/desktop,chromium/chromium,brave/brave-browser&type=Date)](https://star-history.com/#zen-browser/desktop&chromium/chromium&brave/brave-browser&Date)

Expand Down
3 changes: 0 additions & 3 deletions build/codesign/browser.developer.entitlements.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,5 @@
<!-- Required for com.apple.developer.web-browser.public-key-credential -->
<key>com.apple.application-identifier</key>
<string>H36NPCN86W.app.zen-browser.zen</string>

<!-- For platform passkey (webauthn) support -->
<key>com.apple.developer.web-browser.public-key-credential</key><true/>
</dict>
</plist>
Loading

0 comments on commit fd09bd2

Please sign in to comment.