-
Notifications
You must be signed in to change notification settings - Fork 13
215 lines (197 loc) · 6.7 KB
/
release.yaml
File metadata and controls
215 lines (197 loc) · 6.7 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
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
name: Release
on:
push:
tags:
- "*"
workflow_dispatch:
inputs:
build_from:
description: |
Branch or tag to build release artifacts from.
required: false
release_as:
description: |
Publish release under this tag, or update release assets if such release exists.
If empty, release publishing will be skipped.
required: false
default: ""
jobs:
mac:
name: macOS (${{ matrix.os }} ${{ matrix.otp }})
strategy:
fail-fast: false
matrix:
include:
- os: macos-14
otp: "26.2.5.14-1"
rebar3: "3.22.0"
- os: macos-15
otp: "26.2.5.14-1"
rebar3: "3.22.0"
- os: macos-26
otp: "26.2.5.14-1"
rebar3: "3.22.0"
- os: macos-14
otp: "27.3.4.2-6"
rebar3: "3.22.0"
- os: macos-15
otp: "27.3.4.2-6"
rebar3: "3.22.0"
- os: macos-26
otp: "27.3.4.2-6"
rebar3: "3.22.0"
- os: macos-14
otp: "28.2-2"
rebar3: "3.25.1"
- os: macos-15
otp: "28.2-2"
rebar3: "3.25.1"
- os: macos-26
otp: "28.2-2"
rebar3: "3.25.1"
runs-on: ${{ matrix.os }}
steps:
- uses: emqx/macos-erlang@f744c98139c0db83a10619587d4bae4fc49765a8 # v1.0.0
with:
otp-version: ${{ matrix.otp }}
rebar3-version: ${{ matrix.rebar3 }}
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: recursive
fetch-depth: 0
ref: ${{ github.event.inputs.build_from }} # when input is not given, the event tag is used
- name: build release
env:
BUILD_RELEASE: 1
CI_RELEASE_VERSION: ${{ github.event.inputs.release_as }}
run: ./build.sh
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: packages-${{ matrix.os }}-${{ matrix.otp }}
path: |
_packages/*.tar.gz
_packages/*.tar.gz.sha256
linux:
name: linux (${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.builder.otp }})
strategy:
fail-fast: false
matrix:
os:
- ubuntu24.04
- ubuntu22.04
- ubuntu20.04
- debian13
- debian12
- debian11
- amzn2023
- el8
- el9
arch:
- amd64
- arm64
builder:
- vsn: "6.0-8:1.15.7-26.2.5.14-1"
otp: "26.2.5.14-1"
- vsn: "6.0-8:1.18.3-27.3.4.2-6"
otp: "27.3.4.2-6"
- vsn: "6.0-8:1.19.1-28.2-2"
otp: "28.2-2"
runs-on: ubuntu-24.04${{ matrix.arch == 'arm64' && '-arm' || '' }}
container: ghcr.io/emqx/emqx-builder/${{ matrix.builder.vsn }}-${{ matrix.os }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: recursive
fetch-depth: 0
ref: ${{ github.event.inputs.build_from }} # when input is not given, the event tag is used
- run: git config --global --add safe.directory $GITHUB_WORKSPACE
- name: build release
env:
BUILD_RELEASE: 1
CI_RELEASE_VERSION: ${{ github.event.inputs.release_as }}
run: ./build.sh
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: packages-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.builder.otp }}
path: |
_packages/*.tar.gz
_packages/*.tar.gz.sha256
linux-old:
# el7 does not work when using 'container' due to old nodejs version
# same with amzn2, plus it needs even more handholding
# JavaScript Actions in Alpine containers are only supported on x64 Linux runners
name: linux (${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.builder.otp }})
strategy:
fail-fast: false
matrix:
os:
- amzn2
- el7
- alpine3.15.1
arch:
- amd64
- arm64
builder:
- vsn: "6.0-8:1.15.7-26.2.5.14-1"
otp: "26.2.5.14-1"
- vsn: "6.0-8:1.18.3-27.3.4.2-6"
otp: "27.3.4.2-6"
- vsn: "6.0-8:1.19.1-28.2-2"
otp: "28.2-2"
runs-on: ubuntu-24.04${{ matrix.arch == 'arm64' && '-arm' || '' }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: recursive
fetch-depth: 0
ref: ${{ github.event.inputs.build_from }} # when input is not given, the event tag is used
- name: build release
if: matrix.os == 'amzn2'
env:
CI_RELEASE_VERSION: ${{ github.event.inputs.release_as }}
CONTAINER: ghcr.io/emqx/emqx-builder/${{ matrix.builder.vsn }}-${{ matrix.os }}
run: |
docker build --build-arg FROM=$CONTAINER -t emqx-builder:amzn2 -f .ci/Dockerfile.amzn2 .
docker run -t --rm --user 1001 \
-v $(pwd):/wd \
--workdir /wd \
-e BUILD_RELEASE=1 \
-e CI_RELEASE_VERSION=$CI_RELEASE_VERSION \
emqx-builder:amzn2 bash -euc './build.sh'
- name: build release
if: matrix.os != 'amzn2'
env:
CI_RELEASE_VERSION: ${{ github.event.inputs.release_as }}
CONTAINER: ghcr.io/emqx/emqx-builder/${{ matrix.builder.vsn }}-${{ matrix.os }}
run: |
docker run -t --rm --user 1001 \
-v $(pwd):/wd \
--workdir /wd \
-e BUILD_RELEASE=1 \
-e CI_RELEASE_VERSION=$CI_RELEASE_VERSION \
$CONTAINER bash -euc './build.sh'
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: packages-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.builder.otp }}
path: |
_packages/*.tar.gz
_packages/*.tar.gz.sha256
release:
runs-on: ubuntu-latest
needs:
- mac
- linux
- linux-old
if: startsWith(github.ref, 'refs/tags/') || inputs.release_as
steps:
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
pattern: 'packages-*'
path: packages
merge-multiple: true
- name: Create Release
uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2
with:
name: Erlang jq NIF ${{ github.event.inputs.release_as || github.ref_name }} Released
tag_name: ${{ github.event.inputs.release_as || github.ref_name }}
files: "packages/*"