Merge pull request #339 from keynslug/main-0.1 #95
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
workflow_dispatch: | |
inputs: | |
ref: | |
description: 'Ref to release' | |
required: false | |
default: '' | |
ref_name: | |
description: 'Tag to (re)release' | |
required: false | |
push: | |
tags: | |
- "*" | |
branches: | |
- 'ci/**' | |
jobs: | |
mac: | |
strategy: | |
fail-fast: false | |
matrix: | |
otp: | |
- '26' | |
- '27' | |
rebar3: | |
- '3.23.0' | |
openssl: | |
- openssl3 | |
- openssl | |
- sys | |
os: | |
- macos-14 | |
- macos-15 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Configure Homebrew cache | |
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
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 }} | |
echo "$(brew --prefix erlang@${{ matrix.otp }})/bin" >> $GITHUB_PATH | |
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.inputs.ref }} | |
- name: build release | |
env: | |
QUICER_TLS_VER: ${{ matrix.openssl }} | |
run: | | |
wget https://github.com/erlang/rebar3/releases/download/${{ matrix.rebar3 }}/rebar3 | |
sudo mv rebar3 /usr/local/bin/ && sudo chmod +x /usr/local/bin/rebar3 | |
erl -eval 'erlang:display(erlang:system_info(system_version)),halt()' | |
export QUICER_TLS_VER | |
BUILD_RELEASE=1 make | |
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | |
with: | |
name: quicer-${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.openssl }} | |
path: | | |
_packages/*.gz | |
_packages/*.gz.sha256 | |
emqx-linux: | |
strategy: | |
fail-fast: false | |
matrix: | |
erlang: | |
- otp: 26.2.5.2-3 | |
builder: 5.4-4:1.15.7-26.2.5.2-3 | |
- otp: 27.2-2 | |
builder: 5.4-4:1.17.3-27.2-2 | |
openssl: | |
- openssl3 | |
- openssl | |
- sys | |
arch: | |
- amd64 | |
- arm64 | |
os: | |
- ubuntu24.04 | |
- ubuntu22.04 | |
- ubuntu20.04 | |
- debian12 | |
- debian11 | |
- debian10 | |
- amzn2023 | |
- amzn2 | |
- el9 | |
- el8 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.inputs.ref }} | |
- uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 | |
- uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 | |
with: | |
platforms: ${{ matrix.arch }} | |
- name: build release | |
run: | | |
docker run -i --rm -v $(pwd):/wd --workdir /wd \ | |
--platform=linux/${{ matrix.arch }} \ | |
-e BUILD_RELEASE=1 \ | |
-e QUICER_TLS_VER=${{ matrix.openssl }} \ | |
ghcr.io/emqx/emqx-builder/${{ matrix.erlang.builder }}-${{ matrix.os }} \ | |
bash -euc '\ | |
git config --global --add safe.directory /wd; \ | |
grep -q "\"Amazon Linux 2\"" /etc/os-release && alternatives --set python /usr/bin/python2; \ | |
which yum && yum install -y perl-IPC-Cmd; \ | |
make' | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: quicer-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.erlang.otp }}-${{ matrix.openssl }} | |
path: | | |
_packages/*.gz | |
_packages/*.gz.sha256 | |
release: | |
runs-on: ubuntu-latest | |
needs: | |
- mac | |
- emqx-linux | |
if: github.event.inputs.ref_name || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
pattern: 'quicer-*' | |
path: packages | |
merge-multiple: true | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: quicer ${{ github.event.inputs.ref_name || github.ref_name }} Released | |
tag_name: ${{ github.event.inputs.ref_name || github.ref_name }} | |
files: packages/* | |
draft: true | |
prerelease: false |