From 87e1db5045b0f58a7207ea040770da53548d3ba1 Mon Sep 17 00:00:00 2001 From: LKedward Date: Thu, 19 Nov 2020 14:33:17 +0000 Subject: Check release version on all platforms --- .github/workflows/CI.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a65bad2..d57e02a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -29,6 +29,7 @@ jobs: STACK_CACHE_VERSION: "" BOOTSTRAP_FILE: "/home/runner/.local/bin/fpm" XSUFFIX: "" + CHECK_VERSION_CMD: grep $(echo ${{ github.ref }} | cut -dv -f2) RELEASE_CMD: "fpm run --flag --static --flag -g --flag -fbacktrace --flag -O3 --runner cp" - os: macos-latest STACK_CACHE: | @@ -37,6 +38,7 @@ jobs: STACK_CACHE_VERSION: "v2" BOOTSTRAP_FILE: "/Users/runner/.local/bin/fpm" XSUFFIX: "" + CHECK_VERSION_CMD: grep $(echo ${{ github.ref }} | cut -dv -f2) RELEASE_CMD: "fpm run --flag -g --flag -fbacktrace --flag -O3 --runner cp" - os: windows-latest STACK_CACHE: | @@ -45,6 +47,7 @@ jobs: STACK_CACHE_VERSION: "v2" BOOTSTRAP_FILE: C:\Users\runneradmin\AppData\Roaming\local\bin\fpm.exe XSUFFIX: ".exe" + CHECK_VERSION_CMD: Select-String -Pattern Version | Where-Object { if ($_ -like -join("*",("${{ github.ref }}" -Split "v")[1],"*")) {echo $_} else {Throw} } RELEASE_CMD: "fpm run --flag --static --flag -g --flag -fbacktrace --flag -O3 --runner copy" env: @@ -120,10 +123,10 @@ jobs: # ----- Upload binaries if creating a release ----- - name: Check that fpm --version matches release tag - if: github.event_name == 'release' && contains(matrix.os, 'ubuntu') + if: github.event_name == 'release' run: | cd fpm - fpm run -- "--version" | grep $(echo ${{ github.ref }} | cut -dv -f2) + fpm run -- "--version" | ${{ matrix.CHECK_VERSION_CMD }} - name: Stage release files for upload if: github.event_name == 'release' -- cgit v1.2.3