Skip to content

Truly independent web browser

CI: Add a workflow that packages Distribution builds

Jelle Raaijmakers44256b10d94f
diff --git a/.github/workflows/distribution.yml b/.github/workflows/distribution.yml
new file mode 100644
index 00000000000..0b583eaa1bf
--- /dev/null
+++ b/.github/workflows/distribution.yml
@@ -0,0 +1,41 @@
+name: Distribution
+
+run-name: Distribution ${{ inputs.version }}
+
+on:
+ workflow_dispatch:
+ inputs:
+ version:
+ description: 'Version to build, such as 2026.11.1 or 2027.1.4.alpha'
+ required: true
+ type: string
+
+jobs:
+ Lagom:
+ if: github.repository == 'LadybirdBrowser/ladybird'
+ name: ${{ matrix.os_name }}, ${{ matrix.arch }}, Distribution, Clang
+
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - os_name: 'macOS'
+ arch: 'arm64'
+ runner_labels: '["blacksmith-6vcpu-macos-26"]'
+
+ permissions:
+ contents: read
+ id-token: write
+ attestations: write
+ artifact-metadata: write
+
+ secrets:
+ VCPKG_CACHE_SAS: ${{ secrets.VCPKG_CACHE_SAS }}
+ uses: ./.github/workflows/lagom-template.yml
+ with:
+ toolchain: 'Clang'
+ os_name: ${{ matrix.os_name }}
+ runner_labels: ${{ matrix.runner_labels }}
+ arch: ${{ matrix.arch }}
+ build_preset: 'Distribution'
+ version: ${{ inputs.version }}
diff --git a/.github/workflows/lagom-template.yml b/.github/workflows/lagom-template.yml
index ed3842d3896..d35745b0a2e 100644
--- a/.github/workflows/lagom-template.yml
+++ b/.github/workflows/lagom-template.yml
@@ -26,6 +26,13 @@ on:
required: false
type: string
default: 'null'
+ version:
+ required: false
+ type: string
+ default: ''
+ secrets:
+ VCPKG_CACHE_SAS:
+ required: false
env:
# runner.workspace = /home/runner/work/ladybird
@@ -143,12 +150,14 @@ jobs:
env:
VCPKG_CACHE_SAS: ${{ github.ref == 'refs/heads/master' && secrets.VCPKG_CACHE_SAS || '' }}
VCPKG_CACHE_MODE: ${{ github.ref == 'refs/heads/master' && 'write' || '' }}
+ RELEASE_VERSION: ${{ inputs.version }}
run: |
cmake --preset ${{ inputs.build_preset }} -B Build \
${{ steps.build-parameters.outputs.cmake_options }} \
-DPython3_EXECUTABLE=${{ env.pythonLocation }}/bin/python \
-DCMAKE_C_COMPILER=${{ steps.build-parameters.outputs.host_cc }} \
- -DCMAKE_CXX_COMPILER=${{ steps.build-parameters.outputs.host_cxx }}
+ -DCMAKE_CXX_COMPILER=${{ steps.build-parameters.outputs.host_cxx }} \
+ "-DLADYBIRD_VERSION=${RELEASE_VERSION}"
- name: Create Build Environment (Windows)
if: ${{ inputs.os_name == 'Windows' }}
@@ -203,6 +212,27 @@ jobs:
retention-days: 3
if-no-files-found: error
+ - name: Package the release
+ if: ${{ github.workflow == 'Distribution' }}
+ working-directory: ${{ github.workspace }}/Build
+ run: |
+ cpack -G TZST -B packages -D CPACK_COMPONENTS_ALL="ladybird_Runtime;ladybird_Symbols" \
+ -D CPACK_ARCHIVE_COMPRESSION_LEVEL=19 -D CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY=ON
+
+ - name: Attest the release
+ if: ${{ github.workflow == 'Distribution' }}
+ uses: actions/attest@v4
+ with:
+ subject-path: '${{ github.workspace }}/Build/packages/*.tar.zst'
+
+ - name: Upload the release
+ if: ${{ github.workflow == 'Distribution' }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: ladybird-${{ inputs.os_name }}-${{ inputs.arch }}
+ path: Build/packages/*.tar.zst
+ compression-level: 0
+ if-no-files-found: error
- name: Save Caches
uses: ./.github/actions/cache-save