Skip to content

Commit

Permalink
ci: fix release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
id committed Jun 3, 2024
1 parent 1326920 commit 2b4d868
Showing 1 changed file with 17 additions and 23 deletions.
40 changes: 17 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ jobs:
fail-fast: false
matrix:
otp:
- "25.3.2-2"
- "26.2.3-1"
os:
- ubuntu24.04
Expand Down Expand Up @@ -94,17 +93,19 @@ jobs:
run: |
mkdir test-package
cp *.tar.gz test-package/
cd test-package
pushd test-package
tar xfz emqttb*.tar.gz
docker network create emqttb
docker run -d --name emqx --network emqttb emqx/emqx:latest
docker run -t --rm -v $(pwd):/emqttb -w /emqttb --network emqttb $EMQX_BUILDER bash -c 'tar xfz emqttb*.tar.gz && bin/emqttb --loiter 5s @pub -t test @g --host emqx'
docker run -t --rm -v $(pwd):/emqttb -w /emqttb --network emqttb $EMQX_BUILDER bash -c 'bin/emqttb --loiter 5s @pub -t test @g --host emqx'
popd
- if: failure()
run: cat rebar3.crashdump
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
if: startsWith(github.ref, 'refs/tags/')
if: success()
with:
name: packages-${{ matrix.os }}-${{ matrix.otp }}
path: ./*.tar.gz
name: emqttb-${{ matrix.os }}-${{ matrix.otp }}
path: ./emqttb*.tar.gz

mac:
strategy:
Expand All @@ -114,7 +115,6 @@ jobs:
- macos-13
- macos-14
otp:
- "25"
- "26"

runs-on: ${{ matrix.macos }}
Expand Down Expand Up @@ -150,17 +150,18 @@ jobs:
emqx start
mkdir test-package
cp *.tar.gz test-package/
cd test-package
pushd test-package
tar xfz emqttb*.tar.gz
bin/emqttb --loiter 5s @pub -t test @g --host localhost
popd
- if: failure()
run: cat rebar3.crashdump
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
if: startsWith(github.ref, 'refs/tags/')
if: success()
with:
name: packages-${{ matrix.macos }}-${{ matrix.otp }}
path: ./*.tar.gz
name: emqttb-${{ matrix.macos }}-${{ matrix.otp }}
path: ./emqttb-*.tar.gz

release:
runs-on: ubuntu-latest
Expand All @@ -172,21 +173,14 @@ jobs:
steps:
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
pattern: "packages-*"
pattern: "emqttb-*"
path: packages
merge-multiple: true
- name: Create Release
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2.0.5
with:
tag_name: ${{ github.ref }}
release_name: EMQTT bench daemon ${{ github.ref }} Released
body: EMQTT bench daemon ${{ github.ref }} Released
name: EMQTT bench daemon ${{ github.ref_name }} Released
body: EMQTT bench daemon ${{ github.ref_name }} Released
files: packages/*
draft: false
prerelease: false
- uses: Rory-Z/upload-release-asset@v1
with:
repo: emqttb
path: "packages/emqttb-*"
token: ${{ github.token }}

0 comments on commit 2b4d868

Please sign in to comment.