From c4872e1d1011b10835abb11ad7c1fbeb55780bb9 Mon Sep 17 00:00:00 2001 From: krisbitney Date: Tue, 12 Sep 2023 19:20:44 +0300 Subject: [PATCH] fixed typo in pkg version used in run-on-arch-action --- .github/workflows/cd-source.yaml | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd-source.yaml b/.github/workflows/cd-source.yaml index b0a8e37bc..2bdb34b26 100644 --- a/.github/workflows/cd-source.yaml +++ b/.github/workflows/cd-source.yaml @@ -80,13 +80,39 @@ jobs: yarn build - name: Package into standalone binary - if: env.TAG_EXISTS == 'false' + if: env.TAG_EXISTS == 'false' && ${{ matrix.arch }} == 'arm64' + uses: uraimo/run-on-arch-action@v2 + with: + arch: aarch64 + distro: ubuntu18.04 + githubToken: ${{ secrets.GITHUB_TOKEN }} + # We need to install node and yarn "again" because they dont exist inside our build container + install: | + apt update && apt -y install curl + curl -fsSL https://deb.nodesource.com/setup_14.x | bash - + apt-get install -y nodejs + curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - + echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list + apt update && apt -y install yarn + yarn global add pkg@5.8.1 --prefix /usr/local + pkg --version + run: | + pkg \ + --config ./packages/cli/package.json \ + --target=${{ matrix.node-version }}-${{ matrix.os }}-${{ matrix.arch }} \ + --output ./packages/cli/standalone-binaries/polywrap-${{ matrix.os }}-${{ matrix.arch }} \ + --debug \ + --compress Brotli \ + ./packages/cli/bin/polywrap + + - name: Package into standalone binary + if: env.TAG_EXISTS == 'false' && ${{ matrix.arch }} == 'x64' working-directory: ./packages/cli run: | npx pkg . --target=${{ matrix.node-version }}-${{ matrix.os }}-${{ matrix.arch }} --output ./standalone-binaries/polywrap-${{ matrix.os }}-${{ matrix.arch }} --compress Brotli - name: Extract binary path - if: env.TAG_EXISTS == 'false' + if: env.TAG_EXISTS == 'false' && ${{ matrix.arch }} == 'x64' run: echo STANDALONE_BINARY_PATH=$(stat ./packages/cli/standalone-binaries/polywrap-${{ matrix.os }}-${{ matrix.arch }} | awk '/File:/ {print $2}') >> $GITHUB_ENV - name: Upload Artifacts