From a3640ab8b494acec66af9f1d725d9858d59900d1 Mon Sep 17 00:00:00 2001 From: Andrew Maiorov Date: Thu, 1 Oct 2026 18:02:32 +0200 Subject: [PATCH 1/4] ci: port EMQX binary release workflow --- .github/workflows/build_elvis_binary.yaml | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/build_elvis_binary.yaml diff --git a/.github/workflows/build_elvis_binary.yaml b/.github/workflows/build_elvis_binary.yaml new file mode 100644 index 0000000..19ced08 --- /dev/null +++ b/.github/workflows/build_elvis_binary.yaml @@ -0,0 +1,40 @@ +name: Build and upload + +on: + push: + tags: + - '*-emqx-*' # Push events matching v*. e.g 1.0.0-emqx-1 + +permissions: + contents: write + +jobs: + build-and-upload: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - name: build + run: | + docker info + docker run --rm -v "$(pwd):/src" --workdir /src erlang:26.2 rebar3 escriptize + sudo mv _build/default/bin/elvis . + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + draft: false + prerelease: false + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_name: elvis + asset_path: ./elvis + asset_content_type: application/binary From b8073ccbeac2c318abe06c0dedcd3c6d5e74096a Mon Sep 17 00:00:00 2001 From: Andrew Maiorov Date: Thu, 1 Oct 2026 18:18:47 +0200 Subject: [PATCH 2/4] ci: build EMQX releases with OTP 28 --- .github/workflows/build_elvis_binary.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_elvis_binary.yaml b/.github/workflows/build_elvis_binary.yaml index 19ced08..c37f602 100644 --- a/.github/workflows/build_elvis_binary.yaml +++ b/.github/workflows/build_elvis_binary.yaml @@ -16,7 +16,7 @@ jobs: - name: build run: | docker info - docker run --rm -v "$(pwd):/src" --workdir /src erlang:26.2 rebar3 escriptize + docker run --rm -v "$(pwd):/src" --workdir /src erlang:28 rebar3 escriptize sudo mv _build/default/bin/elvis . - name: Create Release id: create_release From e93055ea57307f7f16a870fc00e399856192a8a0 Mon Sep 17 00:00:00 2001 From: Andrew Maiorov Date: Thu, 1 Oct 2026 18:20:22 +0200 Subject: [PATCH 3/4] ci: update GitHub Actions and replace archived release actions --- .github/workflows/build_elvis_binary.yaml | 30 ++++++++--------------- .github/workflows/ci.yml | 6 ++--- 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build_elvis_binary.yaml b/.github/workflows/build_elvis_binary.yaml index c37f602..9b2d09a 100644 --- a/.github/workflows/build_elvis_binary.yaml +++ b/.github/workflows/build_elvis_binary.yaml @@ -12,29 +12,19 @@ jobs: build-and-upload: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: build run: | docker info docker run --rm -v "$(pwd):/src" --workdir /src erlang:28 rebar3 escriptize sudo mv _build/default/bin/elvis . - - name: Create Release - id: create_release - uses: actions/create-release@v1 + - name: Create release and upload binary env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: ${{ github.ref }} - draft: false - prerelease: false - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_name: elvis - asset_path: ./elvis - asset_content_type: application/binary + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release create "$GITHUB_REF_NAME" ./elvis \ + --repo "$GITHUB_REPOSITORY" \ + --verify-tag \ + --title "$GITHUB_REF" \ + --notes "" \ + --prerelease=false diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8747fca..98ffab2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,14 +17,14 @@ jobs: otp_vsn: ['26', '27', '28'] rebar3_vsn: ['3.25'] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - uses: erlef/setup-beam@v1 id: setup-beam with: otp-version: ${{matrix.otp_vsn}} rebar3-version: ${{matrix.rebar3_vsn}} - name: Restore _build - uses: actions/cache@v4 + uses: actions/cache@v6 with: path: _build key: "_build-cache-for\ @@ -33,7 +33,7 @@ jobs: -rebar3-${{steps.setup-beam.outputs.rebar3-version}}\ -hash-${{hashFiles('rebar.lock')}}" - name: Restore rebar3's cache - uses: actions/cache@v4 + uses: actions/cache@v6 with: path: ~/.cache/rebar3 key: "rebar3-cache-for\ From 47b31d1d63aca234f55a397adb2b74936a26be69 Mon Sep 17 00:00:00 2001 From: Andrew Maiorov Date: Thu, 1 Oct 2026 22:55:02 +0200 Subject: [PATCH 4/4] ci: build releases with setup-beam and verify escript --- .github/workflows/build_elvis_binary.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_elvis_binary.yaml b/.github/workflows/build_elvis_binary.yaml index 9b2d09a..c35fd92 100644 --- a/.github/workflows/build_elvis_binary.yaml +++ b/.github/workflows/build_elvis_binary.yaml @@ -13,11 +13,15 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v7 - - name: build + - uses: erlef/setup-beam@v1 + with: + otp-version: '28' + rebar3-version: '3.25' + - name: Build release binary run: | - docker info - docker run --rm -v "$(pwd):/src" --workdir /src erlang:28 rebar3 escriptize - sudo mv _build/default/bin/elvis . + rebar3 escriptize + cp _build/default/bin/elvis ./elvis + ./elvis --version - name: Create release and upload binary env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}