From 5a5121c60eda1f8e8e91bc1ae419055ea0b0b434 Mon Sep 17 00:00:00 2001 From: tangowithfoxtrot <5676771+tangowithfoxtrot@users.noreply.github.com> Date: Wed, 4 Dec 2024 17:40:38 +0000 Subject: [PATCH] ci: works on first try..? --- .github/workflows/build-cli.yml | 21 +++++++++++++++++---- apps/cli/package.json | 6 ++---- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-cli.yml b/.github/workflows/build-cli.yml index d480879fb15..af4d64da3bf 100644 --- a/.github/workflows/build-cli.yml +++ b/.github/workflows/build-cli.yml @@ -55,7 +55,7 @@ jobs: - name: Check out repo uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: - ref: ${{ github.event.pull_request.head.sha }} + ref: ${{ github.event.pull_request.head.sha }} - name: Get Package Version id: retrieve-package-version @@ -78,6 +78,7 @@ jobs: os: [ { base: "linux", distro: "ubuntu-22.04" }, + { base: "linux-musl", distro: "ubuntu-22.04" }, { base: "mac", distro: "macos-13" } ] license_type: @@ -97,7 +98,7 @@ jobs: - name: Check out repo uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: - ref: ${{ github.event.pull_request.head.sha }} + ref: ${{ github.event.pull_request.head.sha }} - name: Setup Unix Vars run: | @@ -139,7 +140,19 @@ jobs: - name: Build & Package Unix run: npm run dist:${{ matrix.license_type.build_prefix }}:${{ env.SHORT_RUNNER_OS }} --quiet - - name: Zip Unix + - name: Zip Linux + if: ${{ env.LOWER_RUNNER_OS == 'linux' }} + run: | + # package MUSL build + mv ./dist/${{ matrix.license_type.build_prefix }}/${{ env.LOWER_RUNNER_OS }}/cli-alpine bw + zip ../../bw${{ matrix.license_type.artifact_prefix }}-${{ env.LOWER_RUNNER_OS }}-musl-${{ env._PACKAGE_VERSION }}.zip ./bw + rm -f ./dist/${{ matrix.license_type.build_prefix }}/${{ env.LOWER_RUNNER_OS }}/bw + + # package glibc build + mv ./dist/${{ matrix.license_type.build_prefix }}/${{ env.LOWER_RUNNER_OS }}/cli-linux bw + zip ../../bw${{ matrix.license_type.artifact_prefix }}-${{ env.LOWER_RUNNER_OS }}-${{ env._PACKAGE_VERSION }}.zip ./bw + + - name: Zip macOS run: | cd ./dist/${{ matrix.license_type.build_prefix }}/${{ env.LOWER_RUNNER_OS }} zip ../../bw${{ matrix.license_type.artifact_prefix }}-${{ env.LOWER_RUNNER_OS }}-${{ env._PACKAGE_VERSION }}.zip ./bw @@ -197,7 +210,7 @@ jobs: - name: Check out repo uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: - ref: ${{ github.event.pull_request.head.sha }} + ref: ${{ github.event.pull_request.head.sha }} - name: Setup Windows builder run: | diff --git a/apps/cli/package.json b/apps/cli/package.json index 17f0b84ff6b..2d34432e02e 100644 --- a/apps/cli/package.json +++ b/apps/cli/package.json @@ -38,12 +38,10 @@ "dist:bit:lin": "npm run build:bit:prod && npm run clean && npm run package:bit:lin", "package:oss:win": "pkg . --targets win-x64 --output ./dist/oss/windows/bw.exe", "package:oss:mac": "pkg . --targets macos-x64 --output ./dist/oss/macos/bw", - "package:oss:lin": "pkg . --targets linux-x64 --output ./dist/oss/linux/bw", - "package:oss:lin-musl": "pkg . --targets alpine --output ./dist/oss/linux-musl/bw", + "package:oss:lin": "pkg . --targets linux-x64,alpine --out-dir ./dist/oss/linux", "package:bit:win": "pkg . --targets win-x64 --output ./dist/bit/windows/bw.exe", "package:bit:mac": "pkg . --targets macos-x64 --output ./dist/bit/macos/bw", - "package:bit:lin": "pkg . --targets linux-x64 --output ./dist/bit/linux/bw", - "package:bit:lin-musl": "pkg . --targets alpine --output ./dist/bit/linux-musl/bw", + "package:bit:lin": "pkg . --targets linux-x64,alpine --out-dir ./dist/bit/linux", "test": "jest", "test:watch": "jest --watch", "test:watch:all": "jest --watchAll"