From 5dc8e3d41698657709a73f23c9238800687fe00b Mon Sep 17 00:00:00 2001 From: Marcelo Bezerra <23555060+mmosca@users.noreply.github.com> Date: Mon, 25 Dec 2023 19:50:27 +0100 Subject: [PATCH] Windows env --- .github/workflows/build.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3e06192e4..831fd466f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -119,6 +119,8 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v4 + - name: Install linux utils + run: choco install --force -y awk grep sed - name: Setup environment env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true @@ -132,7 +134,7 @@ jobs: # why we try github.event.pull_request.head.sha first set COMMIT_ID=${COMMIT_ID:-${{ github.sha }}} set BUILD_SUFFIX=ci-$(date '+%Y%m%d')-$(git rev-parse --short ${COMMIT_ID}) - set VERSION=$(grep version package.json | cut -d: -f2 | sed 's/[",]//g' | awk '{print $1}') + set VERSION=$(grep version package.json | sed 's/.*"\([0-9][0-9]*.[0-9]*.[0-9]*\)".*/\1/g') echo "BUILD_SUFFIX=${BUILD_SUFFIX}" >> $GITHUB_ENV echo "BUILD_NAME=inav-configurator-${VERSION}-${BUILD_SUFFIX}" >> $GITHUB_ENV