-
Notifications
You must be signed in to change notification settings - Fork 38
143 lines (131 loc) · 3.57 KB
/
release.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
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
name: release
on:
workflow_dispatch:
inputs:
ref:
description: 'Ref to release'
required: false
default: ''
push:
tags:
- "*"
branches:
- 'ci/**'
jobs:
mac:
strategy:
fail-fast: false
matrix:
otp:
- 25
- 26
openssl:
- openssl3
- openssl
os:
- macos-12
- macos-12-arm64
runs-on: ${{ matrix.os }}
steps:
- name: Configure Homebrew cache
uses: actions/cache@v3
with:
path: |
~/Library/Caches/Homebrew/
~/Library/Caches/Homebrew/downloads/
key: brew-${{ matrix.os }}-${{ matrix.otp }}
- name: prepare
run: |
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
brew install erlang@${{ matrix.otp }}
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.inputs.ref }}
- name: build release
if: startsWith(github.ref, 'refs/tags/')
env:
QUIC_TLS: ${{ matrix.openssl }}
run: |
wget https://s3.amazonaws.com/rebar3/rebar3 && chmod +x rebar3
export PATH="$PWD:/usr/local/opt/erlang@${{ matrix.otp }}/bin:$PATH"
erl -eval 'erlang:display(erlang:system_info(system_version)),halt()'
export QUIC_TLS
BUILD_RELEASE=1 make
- uses: actions/upload-artifact@v3
if: startsWith(github.ref, 'refs/tags/')
with:
name: packages
path: |
_packages/*.gz
_packages/*.gz.sha256
linux:
strategy:
fail-fast: false
matrix:
builder:
- 5.2-7:1.15.7-25.3.2-2
- 5.2-7:1.15.7-26.1.2-1
openssl:
- openssl3
- openssl
arch:
- amd64
- arm64
os:
- ubuntu22.04
- ubuntu20.04
- ubuntu18.04
- debian12
- debian11
- debian10
- amzn2023
- el9
- el8
- el7
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: install rebar3
run: |
wget https://s3.amazonaws.com/rebar3/rebar3 && chmod +x rebar3
cp ./rebar3 /usr/local/bin/rebar3
- uses: docker/setup-buildx-action@v2
- uses: docker/setup-qemu-action@v2
with:
platforms: ${{ matrix.arch }}
- name: build release
if: startsWith(github.ref, 'refs/tags/')
run: |
IMAGE=ghcr.io/emqx/emqx-builder/${{ matrix.builder }}-${{ matrix.os }}
docker run -i --rm -v $(pwd):/wd --workdir /wd --platform=linux/${{ matrix.arch }} \
-e BUILD_RELEASE=1 -e QUIC_TLS=${{ matrix.openssl }} \
$IMAGE bash -euc 'git config --global --add safe.directory /wd; make'
- uses: actions/upload-artifact@v3
if: startsWith(github.ref, 'refs/tags/')
with:
name: packages
path: |
_packages/*.gz
_packages/*.gz.sha256
release:
runs-on: ubuntu-latest
needs:
- mac
- linux
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v3
with:
name: packages
path: packages
- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: quicer ${{ github.ref_name }} Released
body: quicer ${{ github.ref_name }} Released
files: packages/*
draft: false
prerelease: false