From 27f0988cd69f569b37d4280e491bec756382f238 Mon Sep 17 00:00:00 2001 From: Raul Victor Trombin Date: Thu, 29 Feb 2024 14:05:47 -0300 Subject: [PATCH] github: action: Add release assets --- .github/workflows/action.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 017c978..6473eb6 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -95,3 +95,36 @@ jobs: fi kill $PID + + release-assets: + needs: ["test-local"] + runs-on: ubuntu-latest + if: "startsWith(github.ref, 'refs/tags/')" + strategy: + fail-fast: false + matrix: + include: + - TARGET: armv7-unknown-linux-gnueabihf + - TARGET: aarch64-unknown-linux-gnu + - TARGET: armv7-unknown-linux-musleabihf + - TARGET: aarch64-unknown-linux-musl + steps: + - name: Download ${{ matrix.TARGET }} artifacts + uses: actions/download-artifact@v2 + with: + name: ${{ matrix.TARGET }} + path: ${{ matrix.TARGET }} + - name: Compress Asset + run: | + sudo apt update + sudo apt install -y zip + cd ${{ matrix.TARGET }} + chmod +x ./navigator-webassistant + zip -rT ../${{ matrix.TARGET }}.zip * + - name: Upload assets to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ matrix.TARGET }}.zip + tag: ${{ github.ref }} + asset_name: ${{ matrix.TARGET }}.zip