77 description : ' Ref to release'
88 required : false
99 default : ' '
10+ ref_name :
11+ description : ' Tag to (re)release'
12+ required : false
1013 push :
1114 tags :
1215 - " *"
1316 branches :
1417 - ' ci/**'
18+
1519jobs :
1620 mac :
1721 strategy :
1822 fail-fast : false
1923 matrix :
2024 otp :
21- - 26
25+ - ' 26'
26+ - ' 27'
27+ rebar3 :
28+ - ' 3.23.0'
2229 openssl :
2330 - openssl3
2431 - openssl
2532 - sys
2633 os :
2734 - macos-14
28- - macos-13
35+ - macos-15
2936 runs-on : ${{ matrix.os }}
3037 steps :
3138
@@ -47,18 +54,16 @@ jobs:
4754 ref : ${{ github.event.inputs.ref }}
4855
4956 - name : build release
50- if : startsWith(github.ref, 'refs/tags/')
5157 env :
5258 QUICER_TLS_VER : ${{ matrix.openssl }}
5359 run : |
54- wget https://s3.amazonaws. com/rebar3/rebar3 && chmod +x rebar3
60+ wget https://github. com/erlang/ rebar3/releases/download/${{ matrix. rebar3 }}/ rebar3
5561 sudo mv rebar3 /usr/local/bin/ && sudo chmod +x /usr/local/bin/rebar3
5662 erl -eval 'erlang:display(erlang:system_info(system_version)),halt()'
5763 export QUICER_TLS_VER
5864 BUILD_RELEASE=1 make
5965
6066 - uses : actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
61- if : startsWith(github.ref, 'refs/tags/')
6267 with :
6368 name : quicer-${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.openssl }}
6469 path : |
6974 strategy :
7075 fail-fast : false
7176 matrix :
72- otp :
73- - 26.2.5.2-1
77+ erlang :
78+ - otp : 26.2.5.2-3
79+ builder : 5.4-4:1.15.7-26.2.5.2-3
80+ - otp : 27.2-2
81+ builder : 5.4-4:1.17.3-27.2-2
7482 openssl :
7583 - openssl3
7684 - openssl
@@ -95,11 +103,7 @@ jobs:
95103 - uses : actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
96104 with :
97105 fetch-depth : 0
98-
99- - name : install rebar3
100- run : |
101- wget https://s3.amazonaws.com/rebar3/rebar3 && chmod +x rebar3
102- cp ./rebar3 /usr/local/bin/rebar3
106+ ref : ${{ github.event.inputs.ref }}
103107
104108 - uses : docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
105109
@@ -108,20 +112,21 @@ jobs:
108112 platforms : ${{ matrix.arch }}
109113
110114 - name : build release
111- if : startsWith(github.ref, 'refs/tags/')
112115 run : |
113- IMAGE=ghcr.io/emqx/emqx-builder/5.3-13:1.15.7-${{ matrix.otp }}-${{ matrix.os }}
114- docker run -i --rm -v $(pwd):/wd --workdir /wd --platform=linux/${{ matrix.arch }} \
115- -e BUILD_RELEASE=1 -e QUICER_TLS_VER=${{ matrix.openssl }} \
116- $IMAGE bash -euc 'git config --global --add safe.directory /wd; \
117- grep -q "\"Amazon Linux 2\"" /etc/os-release && alternatives --set python /usr/bin/python2; \
118- which yum && yum install -y perl-IPC-Cmd; \
119- make'
116+ docker run -i --rm -v $(pwd):/wd --workdir /wd \
117+ --platform=linux/${{ matrix.arch }} \
118+ -e BUILD_RELEASE=1 \
119+ -e QUICER_TLS_VER=${{ matrix.openssl }} \
120+ ghcr.io/emqx/emqx-builder/${{ matrix.erlang.builder }}-${{ matrix.os }} \
121+ bash -euc '\
122+ git config --global --add safe.directory /wd; \
123+ grep -q "\"Amazon Linux 2\"" /etc/os-release && alternatives --set python /usr/bin/python2; \
124+ which yum && yum install -y perl-IPC-Cmd; \
125+ make'
120126
121127 - uses : actions/upload-artifact@v4
122- if : startsWith(github.ref, 'refs/tags/')
123128 with :
124- name : quicer-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.otp }}-${{ matrix.openssl }}
129+ name : quicer-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.erlang. otp }}-${{ matrix.openssl }}
125130 path : |
126131 _packages/*.gz
127132 _packages/*.gz.sha256
@@ -131,7 +136,7 @@ jobs:
131136 needs :
132137 - mac
133138 - emqx-linux
134- if : startsWith(github.ref, 'refs/tags/')
139+ if : github.event.inputs.ref_name || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') )
135140 steps :
136141 - uses : actions/download-artifact@v4
137142 with :
@@ -141,7 +146,8 @@ jobs:
141146 - name : Create Release
142147 uses : softprops/action-gh-release@v2
143148 with :
144- name : quicer ${{ github.ref_name }} Released
149+ name : quicer ${{ github.event.inputs.ref_name || github.ref_name }} Released
150+ tag_name : ${{ github.event.inputs.ref_name || github.ref_name }}
145151 files : packages/*
146152 draft : true
147153 prerelease : false
0 commit comments