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 May 30, 2024
1 parent 1326920 commit f269eaf
Showing 1 changed file with 17 additions and 21 deletions.
38 changes: 17 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,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 Down Expand Up @@ -150,17 +152,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 +175,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 f269eaf

Please sign in to comment.