-
Notifications
You must be signed in to change notification settings - Fork 95
91 lines (85 loc) · 2.01 KB
/
build-and-test-pkg.yaml
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
name: Build, test and upload .pkg to S3
# The scheduler runs at 9 am UTC every day.
on:
workflow_dispatch:
inputs:
ref_name:
required: true
type: string
workflow_call:
inputs:
ref_name:
required: true
type: string
schedule:
- cron: '0 9 * * *'
env:
GO111MODULE: on
jobs:
get-tag-name:
name: Get tag name
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.check-tag.outputs.tag }}
steps:
- name: Check tag from workflow input and github ref
id: check-tag
run: |
if [ -n "${{ inputs.ref_name }}" ]; then
tag=${{ inputs.ref_name }}
else
tag=${{ github.ref_name }}
fi
echo "tag=$tag" >> ${GITHUB_OUTPUT}
macos-aarch64-pkg-build:
needs: get-tag-name
uses: ./.github/workflows/build-pkg.yaml
secrets: inherit
with:
os: macos
arch: arm64
output_arch: aarch64
version: 14
tag: ${{ needs.get-tag-name.outputs.tag }}
macos-x86-64-pkg-build:
needs: get-tag-name
uses: ./.github/workflows/build-pkg.yaml
secrets: inherit
with:
os: macos
arch: amd64
output_arch: x86_64
version: 14
tag: ${{ needs.get-tag-name.outputs.tag }}
macos-aarch64-pkg-test:
strategy:
fail-fast: false
matrix:
version: [13, 14]
needs:
- get-tag-name
- macos-aarch64-pkg-build
uses: ./.github/workflows/test-pkg.yaml
secrets: inherit
with:
os: macos
arch: arm64
output_arch: aarch64
version: ${{ matrix.version }}
tag: ${{ needs.get-tag-name.outputs.tag }}
macos-x86-64-pkg-test:
strategy:
fail-fast: false
matrix:
version: [13, 14]
needs:
- get-tag-name
- macos-x86-64-pkg-build
uses: ./.github/workflows/test-pkg.yaml
secrets: inherit
with:
os: macos
arch: amd64
output_arch: x86_64
version: ${{ matrix.version }}
tag: ${{ needs.get-tag-name.outputs.tag }}