forked from mmozeiko/build-angle
-
Notifications
You must be signed in to change notification settings - Fork 1
85 lines (75 loc) · 2.24 KB
/
build-angle.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
name: build-angle
on:
schedule:
- cron: "0 0 * * 0"
push:
branches:
- main
jobs:
build-win:
name: Build (Windows)
strategy:
matrix:
os: [windows-2019] # could also add windows-2022
runs-on: ${{ matrix.os }}
env:
BUILD_OS: ${{ matrix.os }}
outputs:
ANGLE_COMMIT: ${{ steps.build.outputs.ANGLE_COMMIT }}
BUILD_DATE: ${{ steps.build.outputs.BUILD_DATE }}
steps:
- name: Check out
uses: actions/checkout@v2
- name: Build
id: build
shell: cmd
run: call build.cmd
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: "angle-${{ matrix.os }}-${{ steps.build.outputs.BUILD_DATE }}.zip"
path: "angle-${{ matrix.os }}-${{ steps.build.outputs.BUILD_DATE }}.zip"
if-no-files-found: error
build-mac:
name: Build (Mac)
strategy:
matrix:
os: [macos-11, macos-12, macos-13]
runs-on: ${{ matrix.os }}
env:
BUILD_OS: ${{ matrix.os }}
steps:
- name: Check out
uses: actions/checkout@v2
- name: Build
id: build
run: ./build.sh
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: "angle-${{ matrix.os }}-${{ steps.build.outputs.BUILD_DATE }}.zip"
path: "angle-${{ matrix.os }}-${{ steps.build.outputs.BUILD_DATE }}.zip"
if-no-files-found: error
release:
runs-on: ubuntu-latest
needs:
- build-win
- build-mac
steps:
- name: Check out
uses: actions/checkout@v2
- name: Download artifacts
uses: actions/download-artifact@v2.1.1
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -x
assets=()
for asset_dir in ./angle-*.zip; do
for asset in $asset_dir/*; do
assets+=("-a" "$asset")
done
done
tag_name="${{ needs.build-win.outputs.BUILD_DATE }}"
hub release create "${assets[@]}" -m "$tag_name" -m "Angle commit: [${{ needs.build-win.outputs.ANGLE_COMMIT }}](https://github.com/google/angle/commit/${{ needs.build-win.outputs.ANGLE_COMMIT }})" "$tag_name"