-
Notifications
You must be signed in to change notification settings - Fork 69
107 lines (104 loc) · 3.42 KB
/
build.yml
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
96
97
98
99
100
101
102
103
104
105
106
107
name: Build macOS binaries of Ungoogled Chromium
on:
workflow_dispatch:
push:
paths:
- 'patches/**'
- 'downloads.ini'
- 'revision.txt'
- 'flags.macos.gn'
- '!build.sh'
- '!README.md'
- '!LICENSE'
- '!devutils/**'
- '.github/scripts/force_build.txt'
jobs:
retrieve-resources:
name: Retrieve resources required for building
runs-on: macos-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: true
- name: Copy GitHub specific scripts to git-root folder
run: cp -va ./.github/scripts/ ./
- name: Disable Spotlight
run: sudo mdutil -a -i off
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install coreutils
run: brew install coreutils
- name: Download and unpack required resources
run: ./github_fetch_resources.sh | tee -a github_actions_retrieve_resources.log
- name: List resources
run: ls -la
- name: Archive resources
run: ./github_pack_resources.sh | tee -a github_actions_retrieve_resources.log
- name: Upload resources
uses: actions/upload-artifact@v4
with:
name: ungoogled_chromium_macos_resources
path: upload_build_resources/
build:
needs: retrieve-resources
name: Build macOS binaries of Ungoogled Chromium
strategy:
matrix:
arch: [arm64, x86-64]
include:
- arch: arm64
os: macos-14
- arch: x86-64
os: macos-13
fail-fast: true
max-parallel: 2
uses: ./.github/workflows/building.yml
with:
arch: ${{ matrix.arch }}
os: ${{ matrix.os }}
release:
needs: build
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
name: Release macOS binaries of Ungoogled Chromium
runs-on: macos-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: true
- name: Copy GitHub specific scripts to git-root folder
run: cp -va ./.github/scripts/ ./
- name: Disable Spotlight
run: sudo mdutil -a -i off
- name: Install coreutils
run: brew install coreutils
- name: Prepare release
id: bake
run: ./github_prepare_release.sh | tee -a github_actions_release.log
- name: Get built x86-64 binary
uses: actions/download-artifact@v4
with:
name: ${{ steps.bake.outputs.x64_file_name }}
- name: Get built arm64 binary
uses: actions/download-artifact@v4
with:
name: ${{ steps.bake.outputs.arm64_file_name }}
- name: List files
run: ls -la
- name: Generate release note
run: ./github_generate_release_note.sh | tee -a github_actions_release.log
- name: Release Ungoogled-Chromium binaries
uses: softprops/action-gh-release@4634c16e79c963813287e889244c50009e7f0981
with:
body_path: ./github_release_note.md
draft: false
prerelease: false
files: |
./release_asset/${{ steps.bake.outputs.x64_file_name }}
./release_asset/${{ steps.bake.outputs.arm64_file_name }}
name: ${{ steps.bake.outputs.release_name }}
tag_name: ${{ steps.bake.outputs.release_tag_version }}
token: ${{ secrets.GITHUB_TOKEN }}