Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup Dependabot and fix some actions #4944

Open
wants to merge 37 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
37c2680
Update
blu3berryys Feb 4, 2025
d873809
Bump
blu3berryys Feb 4, 2025
e552803
Uppercase
blu3berryys Feb 4, 2025
29f40d2
Update
blu3berryys Feb 4, 2025
badc994
Fix
blu3berryys Feb 4, 2025
6671fa3
Add important note
blu3berryys Feb 4, 2025
94c3e52
Setup Dependabot
blu3berryys Feb 4, 2025
88f2611
Fix
blu3berryys Feb 4, 2025
26fc0a9
Bump @zen-browser/surfer from 1.9.15 to 1.9.16
dependabot[bot] Feb 4, 2025
4626145
Add custom free disk space script
blu3berryys Feb 4, 2025
44eea8f
Use custom script
blu3berryys Feb 4, 2025
175b4a8
Use custom script
blu3berryys Feb 4, 2025
f05bf1a
Bump Surfer
blu3berryys Feb 4, 2025
6d76e45
Update license
blu3berryys Feb 4, 2025
2484540
Bump Python
blu3berryys Feb 4, 2025
87b8bec
Merge branch 'zen-browser:dev' into dev
blu3berryys Feb 5, 2025
9dbf1a9
Delete .vscode directory
blu3berryys Feb 5, 2025
e3583ed
Bump
blu3berryys Feb 5, 2025
7455fde
Bump prettier from 3.4.2 to 3.5.0
dependabot[bot] Feb 10, 2025
19ed3b1
Delete .github/workflows/staler.yml
blu3berryys Feb 12, 2025
27a2407
Merge pull request #2 from blu3berryys/dependabot/npm_and_yarn/pretti…
blu3berryys Feb 12, 2025
5ff7aed
Merge pull request #3 from zen-browser/dev
blu3berryys Feb 12, 2025
c0a0468
Merge branch 'dev' into dev
mauro-balades Feb 12, 2025
6ed7256
Add workflow dispatch
blu3berryys Feb 13, 2025
2317f24
Add
blu3berryys Feb 13, 2025
f3c5601
Update macos-universal-release-build.yml
blu3berryys Feb 13, 2025
51fedf8
Update macos-release-build.yml
blu3berryys Feb 13, 2025
3f601ab
Update linux-release-build.yml
blu3berryys Feb 13, 2025
a6cc749
Update macos-release-build.yml
blu3berryys Feb 13, 2025
2d93cf5
Update macos-universal-release-build.yml
blu3berryys Feb 13, 2025
bd311da
Update windows-profile-build.yml
blu3berryys Feb 13, 2025
35ce21d
Bump @zen-browser/surfer from 1.9.16 to 1.9.19
dependabot[bot] Feb 20, 2025
f11ca27
Delete .github/workflows/update-submodules.yml
blu3berryys Feb 23, 2025
c82ef75
Merge pull request #7 from blu3berryys/dependabot/npm_and_yarn/zen-br…
blu3berryys Feb 23, 2025
66a36d2
Fix conflicts pt1
blu3berryys Feb 23, 2025
fd3a97a
Fix conflicts pt2
blu3berryys Feb 23, 2025
9cb5a7c
Fix
blu3berryys Feb 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
86 changes: 45 additions & 41 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -515,60 +515,64 @@ jobs:
# If we are on Twilight, we want to just update the Twilight tag's release
- name: Update Twilight tag
if: ${{ inputs.update_branch == 'twilight' }}
uses: marvinpinto/action-automatic-releases@master
uses: softprops/action-gh-release@v2
with:
files: |
zen.source.tar.zst
zen.linux-x86_64.tar.xz
zen.linux-aarch64.tar.xz
zen-x86_64.AppImage
zen-x86_64.AppImage.zsync
zen-aarch64.AppImage
zen-aarch64.AppImage.zsync
zen.win-x86_64.zip
zen.win-arm64.zip
linux.mar
linux-aarch64.mar
windows.mar
windows-arm64.mar
macos.mar
zen.installer.exe
zen.installer-arm64.exe
zen.macos-universal.dmg
automatic_release_tag: 'twilight'
title: 'Twilight build - ${{ needs.build-data.outputs.version }} (${{ needs.build-data.outputs.build_date }} at ${{ needs.build-data.outputs.build_time }})'
./zen.source.tar.zst/*
./zen.linux-x86_64.tar.xz/*
./zen.linux-aarch64.tar.xz/*
./zen-x86_64.AppImage/*
./zen-x86_64.AppImage.zsync/*
./zen-aarch64.AppImage/*
./zen-aarch64.AppImage.zsync/*
./zen.win-x86_64.zip/*
./zen.win-arm64.zip/*
./linux.mar/*
./linux-aarch64.mar/*
./windows.mar/*
./windows-arm64.mar/*
./macos.mar/*
./zen.installer.exe/*
./zen.installer-arm64.exe/*
./zen.macos-universal.dmg/*
tag_name: 'twilight'
name: 'Twilight build - ${{ needs.build-data.outputs.version }} (${{ needs.build-data.outputs.build_date }} at ${{ needs.build-data.outputs.build_time }})'
draft: false
generate_release_notes: false
prerelease: true
repo_token: ${{ secrets.DEPLOY_KEY }}
token: ${{ secrets.DEPLOY_KEY }}
fail_on_unmatched_files: false
env:
GITHUB_REPOSITORY: ${{ github.repository }}

- name: Release
uses: marvinpinto/action-automatic-releases@master
if: ${{ inputs.update_branch == 'release' }}
with:
repo_token: '${{ secrets.DEPLOY_KEY }}'
automatic_release_tag: ${{ needs.build-data.outputs.version }}
token: '${{ secrets.DEPLOY_KEY }}'
tag_name: ${{ needs.build-data.outputs.version }}
prerelease: false
title: 'Release build - ${{ needs.build-data.outputs.version }} (${{ needs.build-data.outputs.build_date }})'
fail_on_unmatched_files: false
generate_release_notes: false
name: 'Release build - ${{ needs.build-data.outputs.version }} (${{ needs.build-data.outputs.build_date }})'
files: |
zen.source.tar.zst
zen.linux-x86_64.tar.xz
zen.linux-aarch64.tar.xz
zen-x86_64.AppImage
zen-x86_64.AppImage.zsync
zen-aarch64.AppImage
zen-aarch64.AppImage.zsync
.github/workflows/object/windows-x64-signed-x86_64/zen.win-x86_64.zip
.github/workflows/object/windows-x64-signed-arm64/zen.win-arm64.zip
linux.mar
linux-aarch64.mar
.github/workflows/object/windows-x64-signed-x86_64/windows.mar
.github/workflows/object/windows-x64-signed-arm64/windows-arm64.mar
macos.mar
.github/workflows/object/windows-x64-signed-x86_64/zen.installer.exe
.github/workflows/object/windows-x64-signed-arm64/zen.installer-arm64.exe
zen.macos-universal.dmg
./zen.source.tar.zst/*
./zen.linux-x86_64.tar.xz/*
./zen.linux-aarch64.tar.xz/*
./zen-x86_64.AppImage/*
./zen-x86_64.AppImage.zsync/*
./zen-aarch64.AppImage/*
./zen-aarch64.AppImage.zsync/*
./.github/workflows/object/windows-x64-signed-x86_64/zen.win-x86_64.zip
./.github/workflows/object/windows-x64-signed-arm64/zen.win-arm64.zip
./linux.mar/*
./linux-aarch64.mar/*
./.github/workflows/object/windows-x64-signed-x86_64/windows.mar
./.github/workflows/object/windows-x64-signed-arm64/windows-arm64.mar
./macos.mar/*
./.github/workflows/object/windows-x64-signed-x86_64/zen.installer.exe
./.github/workflows/object/windows-x64-signed-arm64/zen.installer-arm64.exe
./zen.macos-universal.dmg/*

prepare-flatpak:
if: ${{ inputs.create_release && inputs.update_branch == 'release' }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/check-candidate-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ name: Check Firefox Candidate Release

on:
schedule:
- cron: '59 4 * * 2'
- cron: '0 0 * * *'
workflow_dispatch:

jobs:
check_candidates:
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v4

- name: Check for any updates
env:
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/issue-metrics.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
name: Monthly issue metrics

on:
workflow_dispatch:
schedule:
- cron: '3 2 1 * *'
- cron: '0 0 1 * *'

jobs:
build:
name: issue metrics
name: Issue metrics
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.DEPLOY_KEY }}

Expand Down Expand Up @@ -39,7 +40,7 @@ jobs:
echo "last_month_year=$previous_year" >> "$GITHUB_ENV"

- name: Run issue-metrics tool
uses: github/issue-metrics@v2
uses: github/issue-metrics@v3
env:
GH_TOKEN: ${{ secrets.DEPLOY_KEY }}
HIDE_AUTHOR: true
Expand All @@ -52,7 +53,7 @@ jobs:
rm -f docs/issue-metrics/${{ env.last_month_year }}_${{ env.last_month }}.md
mv issue_metrics.md docs/issue-metrics/${{ env.last_month_year }}_${{ env.last_month }}.md

- name: Remove metrisc JSON
- name: Remove metrics JSON
run: |
rm -f issue_metrics.json

Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/linux-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
type: string
required: true
default: ''
workflow_dispatch:

jobs:
build-linux:
Expand All @@ -29,10 +30,8 @@ jobs:
name: Build Linux - ${{ matrix.arch }}

steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
- name: Free disk space
run: src/free_disk_space.sh

- name: Checkout repository
uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/macos-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
type: string
required: true
default: ''
workflow_dispatch:

jobs:
mac-build:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/macos-universal-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ on:
description: 'The branch to build'
required: true
type: string
workflow_dispatch:

jobs:
mac-build:
name: Unify macOS (Universal)
runs-on: 'macos-14'
runs-on: macos-14

strategy:
fail-fast: false
Expand Down Expand Up @@ -132,7 +133,7 @@ jobs:
- name: Find first .app folder name
run: |
cd engine/obj-x86_64-apple-darwin/dist
export APP_NAME=$(basename "$(find . -maxdepth 1 -name "Zen *.app" -type d | head -n 1)" .app)
export APP_NAME=${{ inputs.release-branch == 'twilight' && 'Twilight' || 'Zen' }}
echo "APP_NAME=$APP_NAME" >> $GITHUB_ENV
echo "APP_NAME=$APP_NAME"

Expand Down
152 changes: 152 additions & 0 deletions .github/workflows/src/free_disk_space.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
#!/bin/bash
set -euo pipefail

isX86() {
local arch
arch=$(uname -m)
if [ "$arch" = "x86_64" ]; then
return 0
else
return 1
fi
}

printSeparationLine() {
for ((i = 0; i < 80; i++)); do
printf "%s" "$1"
done
printf "\n"
}

getAvailableSpace() {
df -a | awk 'NR > 1 {avail+=$4} END {print avail}'
}

formatByteCount() {
numfmt --to=iec-i --suffix=B --padding=7 "$1"'000'
}

printSavedSpace() {
local before=${1}
local title=${2:-}

local after
after=$(getAvailableSpace)
local saved=$((after - before))

echo ""
printSeparationLine "*"
if [ -n "${title}" ]; then
echo "=> ${title}: Saved $(formatByteCount "$saved")"
else
echo "=> Saved $(formatByteCount "$saved")"
fi
printSeparationLine "*"
echo ""
}

printDF() {
local caption=${1}

printSeparationLine "="
echo "${caption}"
echo ""
echo "$ df -h"
echo ""
df -h
printSeparationLine "="
}

removeDir() {
dir=${1}

local before
if [ ! -d "$dir" ]; then
echo "::warning::Directory $dir does not exist, skipping."
else
before=$(getAvailableSpace)
sudo rm -rf "$dir"
printSavedSpace "$before" "Removed $dir"
fi
}

removeUnusedDirectories() {
local dirs_to_remove=(
"/usr/local/lib/android"
"/usr/share/dotnet"
"/usr/local/.ghcup"
)

for dir in "${dirs_to_remove[@]}"; do
removeDir "$dir"
done
}

execAndMeasureSpaceChange() {
local operation=${1}
local title=${2}

local before
before=$(getAvailableSpace)
$operation

printSavedSpace "$before" "$title"
}

cleanPackages() {
local packages=(
'^aspnetcore-.*'
'^dotnet-.*'
'^llvm-.*'
'^mongodb-.*'
'^mysql-.*'
'azure-cli'
'firefox'
'libgl1-mesa-dri'
'mono-devel'
'php.*'
)

if isX86; then
packages+=(
'google-chrome-stable'
'google-cloud-cli'
'google-cloud-sdk'
'powershell'
)
fi

sudo apt-get -qq remove -y --fix-missing "${packages[@]}"
sudo apt-get autoremove -y || echo "::warning::The command [sudo apt-get autoremove -y] failed"
sudo apt-get clean || echo "::warning::The command [sudo apt-get clean] failed"
}

cleanDocker() {
echo "=> Removing the following Docker images:"
sudo docker image ls
echo "=> Removing Docker images..."
sudo docker image prune --all --force || true
}

cleanSwap() {
sudo swapoff -a || true
sudo rm -rf /mnt/swapfile || true
free -h
}

AVAILABLE_INITIAL=$(getAvailableSpace)

printDF "BEFORE CLEAN-UP:"
echo ""

execAndMeasureSpaceChange cleanPackages "Unused packages"
execAndMeasureSpaceChange cleanDocker "Docker images"
execAndMeasureSpaceChange cleanSwap "Swap storage"

removeUnusedDirectories

echo ""
printDF "After clean-up:"

echo ""
printSavedSpace "$AVAILABLE_INITIAL" "Total saved"
Loading