diff options
author | LKedward <laurence.kedward@bristol.ac.uk> | 2020-11-19 14:33:17 +0000 |
---|---|---|
committer | LKedward <laurence.kedward@bristol.ac.uk> | 2020-11-19 14:59:35 +0000 |
commit | 87e1db5045b0f58a7207ea040770da53548d3ba1 (patch) | |
tree | f7420eb76c5cf05edd474a53b4928066eeda71b7 /.github/workflows/CI.yml | |
parent | bfe258e7c36c46dcc829aa5e30971b22e715943a (diff) | |
download | fpm-87e1db5045b0f58a7207ea040770da53548d3ba1.tar.gz fpm-87e1db5045b0f58a7207ea040770da53548d3ba1.zip |
Check release version on all platforms
Diffstat (limited to '.github/workflows/CI.yml')
-rw-r--r-- | .github/workflows/CI.yml | 7 |
1 files 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' |