-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (64 loc) · 1.82 KB
/
Copy pathrelease.yaml
File metadata and controls
73 lines (64 loc) · 1.82 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
name: Build Zig 0.17.x for OpenHarmony
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
only:
description: Build set (host, native, or all)
required: true
default: all
type: choice
options:
- host
- native
- all
targets:
description: Comma-separated manifest names, or all
required: true
default: all
type: string
permissions:
contents: write
jobs:
build:
runs-on: macos-14
timeout-minutes: 360
env:
CMAKE_GENERATOR: Ninja
CMAKE_BUILD_PARALLEL_LEVEL: 6
BUILD_ONLY: ${{ inputs.only || 'all' }}
BUILD_TARGETS: ${{ inputs.targets || 'all' }}
steps:
- name: Checkout official bootstrap base
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install build tools
run: brew install cmake ninja jq xz
- name: Apply OpenHarmony source patch
run: scripts/apply-ohos-patch.sh
- name: Build and package selected products
run: >-
scripts/build-matrix.sh
--only "$BUILD_ONLY"
--targets "$BUILD_TARGETS"
- name: Upload build products
uses: actions/upload-artifact@v4
with:
name: zig-ohos-${{ env.BUILD_ONLY }}-${{ github.run_id }}
path: |
zig-bootstrap/dist/*.tar.xz
zig-bootstrap/dist/*.sha256
zig-bootstrap/out/ohos-matrix/build-results.tsv
if-no-files-found: error
retention-days: 30
- name: Attach products to tagged release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: |
zig-bootstrap/dist/*.tar.xz
zig-bootstrap/dist/*.sha256