aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/CI.yml31
1 files changed, 14 insertions, 17 deletions
diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
index 6897675..da8f683 100644
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -27,31 +27,28 @@ jobs:
- os: ubuntu-latest
STACK_CACHE: "/home/runner/.stack/"
STACK_CACHE_VERSION: ""
- BOOTSTRAP_FILE: "/home/runner/.local/bin/fpm"
- XSUFFIX: ""
GET_VERSION_CMD: echo ${{ github.ref }} | cut -dv -f2
CHECK_VERSION_CMD: grep $(cat fpm_version)
RELEASE_CMD: "fpm run --flag --static --flag -g --flag -fbacktrace --flag -O3 --runner cp -- fpm-v$(cat fpm_version)-linux-x86_64"
+ BOOTSTRAP_RELEASE_CMD: cp /home/runner/.local/bin/fpm fpm-bootstrap-v$(cat fpm_version)-linux-x86_64
- os: macos-latest
STACK_CACHE: |
/Users/runner/.stack/snapshots
/Users/runner/.stack/setup-exe-src
STACK_CACHE_VERSION: "v2"
- BOOTSTRAP_FILE: "/Users/runner/.local/bin/fpm"
- XSUFFIX: ""
GET_VERSION_CMD: echo ${{ github.ref }} | cut -dv -f2
CHECK_VERSION_CMD: grep $(cat fpm_version)
RELEASE_CMD: "fpm run --flag -g --flag -fbacktrace --flag -O3 --runner cp -- fpm-v$(cat fpm_version)-macos-x86_64"
+ BOOTSTRAP_RELEASE_CMD: cp /Users/runner/.local/bin/fpm fpm-bootstrap-v$(cat fpm_version)-macos-x86_64
- os: windows-latest
STACK_CACHE: |
C:\Users\runneradmin\AppData\Roaming\stack
C:\Users\runneradmin\AppData\Local\Programs\stack
STACK_CACHE_VERSION: "v2"
- BOOTSTRAP_FILE: C:\Users\runneradmin\AppData\Roaming\local\bin\fpm.exe
- XSUFFIX: ".exe"
GET_VERSION_CMD: ("${{ github.ref }}" -Split "v")[1]
CHECK_VERSION_CMD: Select-String -Pattern Version | Where-Object { if ($_ -like -join("*",(Get-Content fpm_version),"*")) {echo $_} else {Throw} }
RELEASE_CMD: fpm run --flag --static --flag -g --flag -fbacktrace --flag -O3 --runner copy -- (-join("fpm-v",(Get-Content fpm_version),"-windows-x86_64.exe"))
+ BOOTSTRAP_RELEASE_CMD: copy C:\Users\runneradmin\AppData\Roaming\local\bin\fpm.exe (-join("fpm-bootstrap-v",(Get-Content fpm_version),"-windows-x86_64.exe"))
env:
FC: gfortran
@@ -137,9 +134,10 @@ jobs:
run: |
cd fpm
${{ matrix.RELEASE_CMD }}
+ ${{ matrix.BOOTSTRAP_RELEASE_CMD }}
- name: Make executable
- if: github.event_name == 'release' && (contains(matrix.os, 'linux') || contains(matrix.os, 'macos'))
+ if: github.event_name == 'release' && (contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos'))
run: chmod u+x fpm/fpm-v*
- name: Upload fpm binary
@@ -152,13 +150,12 @@ jobs:
tag: ${{ github.ref }}
overwrite: true
- # - name: Upload bootstrap fpm binary
- # if: github.event_name == 'release'
- # uses: svenstaro/upload-release-action@v2
- # with:
- # repo_token: ${{ secrets.GITHUB_TOKEN }}
- # file: ${{ matrix.BOOTSTRAP_FILE }}
- # asset_name: fpm-bootstrap-${{ matrix.os }}-x86_64${{ matrix.XSUFFIX }}
- # tag: ${{ github.ref }}
- # overwrite: true
- # prerelease: true \ No newline at end of file
+ - name: Upload bootstrap fpm binary
+ if: github.event_name == 'release'
+ uses: svenstaro/upload-release-action@v2
+ with:
+ repo_token: ${{ secrets.GITHUB_TOKEN }}
+ file: fpm/fpm-bootstrap-v*
+ file_glob: true
+ tag: ${{ github.ref }}
+ overwrite: true \ No newline at end of file