aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorLKedward <laurence.kedward@bristol.ac.uk>2020-11-18 16:26:04 +0000
committerLKedward <laurence.kedward@bristol.ac.uk>2020-11-18 16:26:04 +0000
commit026f1f634803f1d081f6c06eafdc7ccc8556d1fd (patch)
tree2d551a4a0900ef56728f28377df76ea51a7b7ac5 /.github
parente34b4ce8a0e1c49fd286b819e10025e7c918fce1 (diff)
downloadfpm-026f1f634803f1d081f6c06eafdc7ccc8556d1fd.tar.gz
fpm-026f1f634803f1d081f6c06eafdc7ccc8556d1fd.zip
Update: binary release CI
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/CI.yml32
1 files changed, 20 insertions, 12 deletions
diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
index 9106fe2..0191b37 100644
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -25,6 +25,7 @@ jobs:
STACK_CACHE_VERSION: ""
BOOTSTRAP_FILE: "/home/runner/.local/bin/fpm"
XSUFFIX: ""
+ RELEASE_CMD: "fpm run --flag --static --runner cp"
- os: macos-latest
STACK_CACHE: |
/Users/runner/.stack/snapshots
@@ -32,6 +33,7 @@ jobs:
STACK_CACHE_VERSION: "v2"
BOOTSTRAP_FILE: "/Users/runner/.local/bin/fpm"
XSUFFIX: ""
+ RELEASE_CMD: "fpm run --runner cp"
- os: windows-latest
STACK_CACHE: |
C:\Users\runneradmin\AppData\Roaming\stack
@@ -39,6 +41,7 @@ jobs:
STACK_CACHE_VERSION: "v2"
BOOTSTRAP_FILE: C:\Users\runneradmin\AppData\Roaming\local\bin\fpm.exe
XSUFFIX: ".exe"
+ RELEASE_CMD: "fpm run --flag --static --runner copy"
env:
FC: gfortran
@@ -118,20 +121,14 @@ jobs:
cd fpm
fpm run -- "--version" | grep $(echo ${{ github.ref }} | cut -d/ -f3)
- - name: Stage file for upload (Linux / macOS)
+ - name: Stage release files for upload
if: github.event_name == 'release' && (contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos'))
run: |
cd fpm
- fpm run --flag --static --runner cp -- fpm-${{ matrix.os }}-x86_64-debug
-
- - name: Stage file for upload (Windows)
- if: github.event_name == 'release' && contains(matrix.os, 'windows')
- shell: cmd
- run: |
- cd fpm
- fpm run --flag --static --runner copy -- fpm-${{ matrix.os }}-x86_64-debug
+ ${{ matrix.RELEASE_CMD }} -- fpm-${{ matrix.os }}-x86_64-debug
+ ${{ matrix.RELEASE_CMD }} --release -- fpm-${{ matrix.os }}-x86_64-release
- - name: Upload dev trunk binary release
+ - name: Upload debug binary
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v2
with:
@@ -141,8 +138,19 @@ jobs:
tag: ${{ github.ref }}
overwrite: true
prerelease: true
-
- - name: Upload dev trunk binary release (bootstrap fpm)
+
+ - name: Upload release binary
+ if: github.event_name == 'release'
+ uses: svenstaro/upload-release-action@v2
+ with:
+ repo_token: ${{ secrets.GITHUB_TOKEN }}
+ file: fpm/fpm-${{ matrix.os }}-x86_64-release
+ asset_name: fpm-${{ matrix.os }}-x86_64-release${{ matrix.XSUFFIX }}
+ tag: ${{ github.ref }}
+ overwrite: true
+ prerelease: true
+
+ - name: Upload bootstrap fpm binary
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v2
with: