Skip to content

Release

Release #51

Workflow file for this run

name: Release
on:
push:
tags:
- "*"
workflow_dispatch:
inputs:
ref:
required: false
ref_name:
required: false
jobs:
mac:
strategy:
fail-fast: false
matrix:
otp:
- "26"
- "27"
rebar3:
- "3.22.0"
os:
- macos-14
- macos-15
runs-on: ${{ matrix.os }}
steps:
- name: prepare erlang
env:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: "1"
run: |
brew update
brew install erlang@${{ matrix.otp }}
echo "$(brew --prefix erlang@${{ matrix.otp }})/bin" >> $GITHUB_PATH
- name: install rebar3
run: |
wget https://github.com/erlang/rebar3/releases/download/${{ matrix.rebar3 }}/rebar3 && chmod +x rebar3
sudo mv rebar3 /usr/local/bin/ && sudo chmod +x /usr/local/bin/rebar3
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
ref: ${{ github.event.inputs.ref }}
- name: build
run: env BUILD_RELEASE=1 make
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: erlang-rocksdb-nif-${{ matrix.os }}-${{ matrix.otp }}
path: |
_packages/*.gz
_packages/*.gz.sha256
linux:
strategy:
fail-fast: false
matrix:
erlang:
- otp: "26.2.5.2"
builder: "5.4-3:1.15.7-26.2.5.2-2"
- otp: "27.2"
builder: "5.4-3:1.17.3-27.2-1"
arch:
- amd64
- arm64
os:
- ubuntu24.04
- ubuntu22.04
- ubuntu20.04
- debian12
- debian11
- debian10
- el9
- el8
- el7
- amzn2
- amzn2023
- alpine3.15.1
runs-on: "aws-${{ matrix.arch }}"
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
ref: ${{ github.event.inputs.ref }}
submodules: recursive
# NOTE: build in container does not work because older platforms like
# el7 and amzn2 do not support nodejs 20 runtime which is required
# for github actions
- name: build
env:
IMAGE: ghcr.io/emqx/emqx-builder/${{ matrix.erlang.builder }}-${{ matrix.os }}
run: >-
docker run --rm -v ${PWD}:/wd ${IMAGE} bash -euc "
git config --global --add safe.directory '*';
make -C /wd BUILD_RELEASE=1
"
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: erlang-rocksdb-nif-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.erlang.otp }}
path: |
_packages/*.gz
_packages/*.gz.sha256
release:
runs-on: ubuntu-latest
if: github.event.inputs.ref_name || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))
needs:
- mac
- linux
steps:
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
pattern: erlang-rocksdb-nif-*
path: packages
merge-multiple: true
- name: Create Release
uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2.0.5
with:
name: Erlang Rocksdb NIF ${{ github.event.inputs.ref_name || github.ref_name }} Released
tag_name: ${{ github.event.inputs.ref_name || github.ref_name }}
files: packages/*
draft: false
prerelease: false