-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (82 loc) · 2.94 KB
/
build.yml
File metadata and controls
95 lines (82 loc) · 2.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Build Start Browser
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: macos-14
permissions:
contents: write
actions: write # Necesario para leer variables de entorno internas como ACTIONS_CACHE_URL
steps:
- name: Checkout Start Browser Core
uses: actions/checkout@v4
with:
path: start-browser-core
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
- name: Sccache Action
uses: Mozilla-Actions/sccache-action@v0.0.5
- name: Cache Chromium Source
id: cache-chromium
uses: actions/cache@v4
with:
path: src
key: chromium-src-v1-${{ hashFiles('start-browser-core/patches/*.patch') }}
restore-keys: |
chromium-src-v1-
- name: Clone Brave Core
if: steps.cache-chromium.outputs.cache-hit != 'true'
run: |
mkdir -p src
git clone --depth 1 https://github.com/brave/brave-core.git src/brave
- name: Apply Branding and Logic Patches
run: |
CORE_ROOT=$(pwd)/start-browser-core
cd src/brave
# Limpiar cambios antiguos por si vienen de caché
git checkout . || true
git apply "$CORE_ROOT/patches/start_browser_logic.patch"
cp "$CORE_ROOT/branding/"*.png app/theme/brave/
for f in app/theme/brave/BRANDING.*; do
if [ -f "$f" ] && [ "$f" != "app/theme/brave/BRANDING" ]; then
cp app/theme/brave/BRANDING "$f"
fi
done
- name: Install Dependencies
run: |
cd src/brave
npm install
- name: Initialize and Sync Chromium
if: steps.cache-chromium.outputs.cache-hit != 'true'
run: |
cd src/brave
npm run init
- name: Build Start Browser
env:
SCCACHE_GHA_ENABLED: "true"
ACTIONS_CACHE_URL: ${{ env.ACTIONS_CACHE_URL }}
ACTIONS_RUNTIME_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd src/brave
npm run build -- --args="is_official_build=true cc_wrapper=\"sccache\" enable_brave_rewards=false enable_brave_wallet=false enable_brave_vpn=false enable_brave_ads=false enable_brave_news=false enable_ai_chat=false"
- name: Upload Installer Artifact
uses: actions/upload-artifact@v4
with:
name: start-browser-macos
path: src/out/Release/*.dmg
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
if: github.ref == 'refs/heads/main'
with:
tag_name: v1.0.${{ github.run_number }}
name: Start Browser v1.0.${{ github.run_number }}
files: src/out/Release/*.dmg
body: |
🚀 **Start Browser** v1.0.${{ github.run_number }}
Build optimizado con persistencia de caché.
draft: false
prerelease: false