Refactor build workflow to include release branch parameter

This commit is contained in:
mauro-balades
2024-09-30 22:28:04 +02:00
parent 59f356001a
commit 3012c0ad1f
6 changed files with 38 additions and 16 deletions

View File

@@ -193,7 +193,7 @@ jobs:
windows-step-1:
name: Windows build step 1 (PGO build)
uses: ./.github/workflows/windows-alpha-build.yml
uses: ./.github/workflows/windows-release-build.yml
needs: [build-data]
permissions:
contents: write
@@ -202,6 +202,7 @@ jobs:
build-version: ${{ needs.build-data.outputs.version }}
generate-gpo: true
profile-data-path-archive: zen-windows-x86_64-profile-data-and-jarlog.zip
release-branch: ${{ github.event.inputs.update_branch }}
windows-step-2:
name: Windows build step 2 (Generate profile data)
@@ -213,10 +214,11 @@ jobs:
with:
build-version: ${{ needs.build-data.outputs.version }}
profile-data-path-archive: zen.win64-pgo-stage-1.zip
release-branch: ${{ github.event.inputs.update_branch }}
windows-step-3:
name: Windows build step 3 (build with profile data)
uses: ./.github/workflows/windows-alpha-build.yml
uses: ./.github/workflows/windows-release-build.yml
permissions:
contents: write
secrets: inherit
@@ -224,26 +226,29 @@ jobs:
with:
build-version: ${{ needs.build-data.outputs.version }}
generate-gpo: false
release-branch: ${{ github.event.inputs.update_branch }}
linux:
name: Linux build
uses: ./.github/workflows/linux-alpha-build.yml
uses: ./.github/workflows/linux-release-build.yml
permissions:
contents: write
secrets: inherit
needs: [build-data]
with:
build-version: ${{ needs.build-data.outputs.version }}
release-branch: ${{ github.event.inputs.update_branch }}
mac:
name: macOS build
uses: ./.github/workflows/macos-alpha-build.yml
uses: ./.github/workflows/macos-release-build.yml
permissions:
contents: write
secrets: inherit
needs: [build-data]
with:
build-version: ${{ needs.build-data.outputs.version }}
release-branch: ${{ github.event.inputs.update_branch }}
appimage:
name: AppImage build - Linux ${{ matrix.generic == true && 'generic' || 'specific' }}

View File

@@ -1,4 +1,4 @@
name: Linux Alpha Build
name: Linux Release Build
on:
workflow_call:
inputs:
@@ -6,6 +6,10 @@ on:
description: 'The version to build'
required: true
type: string
release-branch:
description: 'The branch to build'
required: true
type: string
jobs:
build-linux:
@@ -87,7 +91,7 @@ jobs:
run: pnpm install
- name: Load surfer CI setup
run: pnpm surfer ci --brand alpha --display-version ${{ inputs.build-version }}
run: pnpm surfer ci --brand ${{ github.event.inputs.release-branch }} --display-version ${{ inputs.build-version }}
- name: Download firefox source and dependencies
run: pnpm surfer download
@@ -110,13 +114,13 @@ jobs:
env:
SURFER_COMPAT: ${{ matrix.generic == true }}
continue-on-error: true
run: sh .github/workflows/src/alpha-build.sh
run: sh .github/workflows/src/release-build.sh
- name: Build again if it failed
if: failure()
env:
SURFER_COMPAT: ${{ matrix.generic == true }}
run: sh .github/workflows/src/alpha-build.sh
run: sh .github/workflows/src/release-build.sh
- name: Package
env:

View File

@@ -1,4 +1,4 @@
name: macOS Alpha Build
name: macOS Release Build
on:
workflow_call:
inputs:
@@ -6,6 +6,11 @@ on:
description: 'The version to build'
required: true
type: string
release-branch:
description: 'The branch to build'
required: true
type: string
jobs:
mac-build:
name: Build macOS - ${{ matrix.arch }}
@@ -87,7 +92,7 @@ jobs:
- name: Install dependencies
run: pnpm install
- name: Load surfer CI setup
run: pnpm surfer ci --brand alpha --display-version ${{ inputs.build-version }}
run: pnpm surfer ci --brand ${{ github.event.inputs.release-branch }} --display-version ${{ inputs.build-version }}
- name: Download firefox source and dependancies
run: pnpm surfer download
@@ -115,11 +120,11 @@ jobs:
if test "${{ matrix.arch }}" = "x64"; then
export ZEN_DISABLE_LTO=1
fi
sh .github/workflows/src/alpha-build.sh
sh .github/workflows/src/release-build.sh
- name: Rebuild Zen if failed
if: failure()
run: sh .github/workflows/src/alpha-build.sh
run: sh .github/workflows/src/release-build.sh
- name: import APPLE DEVELOPER ID CERTIFICATE for .app
uses: apple-actions/import-codesign-certs@v3

View File

@@ -10,7 +10,11 @@ on:
description: 'The path to the zip archive containing the profile data'
required: false
type: string
release-branch:
description: 'The branch to build'
required: true
type: string
jobs:
windows-profile-build:
name: Windows Profile Build - ${{ matrix.generic == true && 'generic' || 'specific' }}

View File

@@ -1,4 +1,4 @@
name: Windows Alpha Build
name: Windows Release Build
on:
workflow_call:
inputs:
@@ -13,6 +13,10 @@ on:
profile-data-path-archive:
description: 'The path to the zip archive containing the profile data'
type: string
release-branch:
description: 'The branch to build'
required: true
type: string
jobs:
windows-build:
@@ -54,7 +58,7 @@ jobs:
pnpm i
- name: Load surfer CI setup
run: pnpm surfer ci --brand alpha --display-version ${{ inputs.build-version }}
run: pnpm surfer ci --brand ${{ github.event.inputs.release-branch }} --display-version ${{ inputs.build-version }}
- name: Download
run: pnpm surfer download
@@ -166,7 +170,7 @@ jobs:
if test ${{ inputs.generate-gpo }} = true; then
export ZEN_GA_GENERATE_PROFILE=1
fi
sh .github/workflows/src/alpha-build.sh
sh .github/workflows/src/release-build.sh
- name: Package
env: