Jelajahi Sumber

chore(ci): ensure rebar3 in actions

zhanghongtong 4 tahun lalu
induk
melakukan
a7d3dced5e

+ 5 - 3
.github/workflows/build_packages.yaml

@@ -96,7 +96,9 @@ jobs:
             Remove-Item -Force -Path rebar.lock
         }
         make ensure-rebar3
-        cp ./rebar3 "${{ steps.install_erlang.outputs.erlpath }}\bin"
+        copy rebar3 "${{ steps.install_erlang.outputs.erlpath }}\bin"
+        ls "${{ steps.install_erlang.outputs.erlpath }}\bin"
+        rebar3 --help
         make ${{ matrix.profile }}
         mkdir -p _packages/${{ matrix.profile }}
         Compress-Archive -Path _build/${{ matrix.profile }}/rel/emqx -DestinationPath _build/${{ matrix.profile }}/rel/$pkg_name
@@ -157,8 +159,8 @@ jobs:
     - name: build
       run: |
         . $HOME/.kerl/${{ matrix.erl_otp }}/activate
-        make ensure-rebar3
-        export PATH="$(pwd):$PATH"
+        make -C source ensure-rebar3
+        sudo cp source/rebar3 /usr/local/bin/rebar3
         make -C source ${{ matrix.profile }}-zip
     - name: test
       run: |

+ 1 - 1
.github/workflows/build_slim_packages.yaml

@@ -89,7 +89,7 @@ jobs:
       run: |
         . $HOME/.kerl/${{ matrix.erl_otp }}/activate
         make ensure-rebar3
-        export PATH="$(pwd):$PATH"
+        sudo cp rebar3 /usr/local/bin/rebar3
         make ${EMQX_NAME}-zip
     - name: test
       run: |