From 2b4d8689e82e490ee30465d942ec684645435fec Mon Sep 17 00:00:00 2001 From: Ivan Dyachkov Date: Mon, 27 May 2024 07:57:15 +0200 Subject: [PATCH] ci: fix release workflow --- .github/workflows/release.yml | 40 +++++++++++++++-------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8d242ce..5ec0804 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -56,7 +56,6 @@ jobs: fail-fast: false matrix: otp: - - "25.3.2-2" - "26.2.3-1" os: - ubuntu24.04 @@ -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: @@ -114,7 +115,6 @@ jobs: - macos-13 - macos-14 otp: - - "25" - "26" runs-on: ${{ matrix.macos }} @@ -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 @@ -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 }}