Skip to content

Commit 09de7d3

Browse files
committed
Update: naming of bootstrap binary release
1 parent 08864fb commit 09de7d3

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

.github/workflows/CI.yml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,31 +27,28 @@ jobs:
2727
- os: ubuntu-latest
2828
STACK_CACHE: "/home/runner/.stack/"
2929
STACK_CACHE_VERSION: ""
30-
BOOTSTRAP_FILE: "/home/runner/.local/bin/fpm"
31-
XSUFFIX: ""
3230
GET_VERSION_CMD: echo ${{ github.ref }} | cut -dv -f2
3331
CHECK_VERSION_CMD: grep $(cat fpm_version)
3432
RELEASE_CMD: "fpm run --flag --static --flag -g --flag -fbacktrace --flag -O3 --runner cp -- fpm-v$(cat fpm_version)-linux-x86_64"
33+
BOOTSTRAP_RELEASE_CMD: cp /home/runner/.local/bin/fpm fpm-bootstrap-v$(cat fpm_version)-linux-x86_64
3534
- os: macos-latest
3635
STACK_CACHE: |
3736
/Users/runner/.stack/snapshots
3837
/Users/runner/.stack/setup-exe-src
3938
STACK_CACHE_VERSION: "v2"
40-
BOOTSTRAP_FILE: "/Users/runner/.local/bin/fpm"
41-
XSUFFIX: ""
4239
GET_VERSION_CMD: echo ${{ github.ref }} | cut -dv -f2
4340
CHECK_VERSION_CMD: grep $(cat fpm_version)
4441
RELEASE_CMD: "fpm run --flag -g --flag -fbacktrace --flag -O3 --runner cp -- fpm-v$(cat fpm_version)-macos-x86_64"
42+
BOOTSTRAP_RELEASE_CMD: cp /Users/runner/.local/bin/fpm fpm-bootstrap-v$(cat fpm_version)-macos-x86_64
4543
- os: windows-latest
4644
STACK_CACHE: |
4745
C:\Users\runneradmin\AppData\Roaming\stack
4846
C:\Users\runneradmin\AppData\Local\Programs\stack
4947
STACK_CACHE_VERSION: "v2"
50-
BOOTSTRAP_FILE: C:\Users\runneradmin\AppData\Roaming\local\bin\fpm.exe
51-
XSUFFIX: ".exe"
5248
GET_VERSION_CMD: ("${{ github.ref }}" -Split "v")[1]
5349
CHECK_VERSION_CMD: Select-String -Pattern Version | Where-Object { if ($_ -like -join("*",(Get-Content fpm_version),"*")) {echo $_} else {Throw} }
5450
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"))
51+
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"))
5552

5653
env:
5754
FC: gfortran
@@ -137,9 +134,10 @@ jobs:
137134
run: |
138135
cd fpm
139136
${{ matrix.RELEASE_CMD }}
137+
${{ matrix.BOOTSTRAP_RELEASE_CMD }}
140138
141139
- name: Make executable
142-
if: github.event_name == 'release' && (contains(matrix.os, 'linux') || contains(matrix.os, 'macos'))
140+
if: github.event_name == 'release' && (contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos'))
143141
run: chmod u+x fpm/fpm-v*
144142

145143
- name: Upload fpm binary
@@ -152,13 +150,12 @@ jobs:
152150
tag: ${{ github.ref }}
153151
overwrite: true
154152

155-
# - name: Upload bootstrap fpm binary
156-
# if: github.event_name == 'release'
157-
# uses: svenstaro/upload-release-action@v2
158-
# with:
159-
# repo_token: ${{ secrets.GITHUB_TOKEN }}
160-
# file: ${{ matrix.BOOTSTRAP_FILE }}
161-
# asset_name: fpm-bootstrap-${{ matrix.os }}-x86_64${{ matrix.XSUFFIX }}
162-
# tag: ${{ github.ref }}
163-
# overwrite: true
164-
# prerelease: true
153+
- name: Upload bootstrap fpm binary
154+
if: github.event_name == 'release'
155+
uses: svenstaro/upload-release-action@v2
156+
with:
157+
repo_token: ${{ secrets.GITHUB_TOKEN }}
158+
file: fpm/fpm-bootstrap-v*
159+
file_glob: true
160+
tag: ${{ github.ref }}
161+
overwrite: true

0 commit comments

Comments
 (0)