Skip to content

Commit 40968b1

Browse files
authored
Merge pull request #985 from fortran-lang/dependabot/github_actions/actions/upload-artifact-4
Bump actions/upload-artifact from 2 to 4
2 parents f210e9d + b50244c commit 40968b1

File tree

2 files changed

+33
-29
lines changed

2 files changed

+33
-29
lines changed

.github/workflows/CI.yml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -173,15 +173,15 @@ jobs:
173173
rm -v ${{ env.FPM }}
174174
echo "FPM_RELEASE=${{ env.EXE }}" >> $GITHUB_ENV
175175
env:
176-
EXE: fpm-${{ env.VERSION }}-${{ matrix.os-arch }}${{ matrix.exe }}
176+
EXE: fpm-${{ env.VERSION }}-${{ matrix.os-arch }}-gcc-${{ matrix.gcc_v }}${{ matrix.exe }}
177177

178178
- name: Run release version
179179
shell: bash
180180
run: |
181181
ci/run_tests.sh "$PWD/${{ env.FPM_RELEASE }}"
182182
183183
- name: Upload artifact
184-
uses: actions/upload-artifact@v2
184+
uses: actions/upload-artifact@v4
185185
with:
186186
name: ${{ env.FPM_RELEASE }}
187187
path: ${{ env.FPM_RELEASE }}
@@ -192,14 +192,19 @@ jobs:
192192
runs-on: windows-latest
193193
needs:
194194
- build
195+
strategy:
196+
fail-fast: false
197+
matrix:
198+
gcc_v: [10,11,12]
195199

196200
steps:
197201
- uses: actions/checkout@v4
198202

199203
- name: Download Artifacts
200-
uses: actions/download-artifact@v2
204+
uses: actions/download-artifact@v4
201205
with:
202-
path: ${{ github.workspace }} # This will download all files
206+
path: ${{ github.workspace }}
207+
pattern: fpm-*-windows-*-gcc-${{ matrix.gcc_v }}.exe
203208

204209
- name: Get version (normal)
205210
if: github.event_name != 'release'
@@ -229,7 +234,7 @@ jobs:
229234
- name: Fetch Windows executable
230235
shell: msys2 {0}
231236
run: |
232-
cp fpm-*/fpm*.exe ./ci/fpm.exe
237+
cp fpm-*/fpm-*-windows-*-gcc-${{ matrix.gcc_v }}.exe ./ci/fpm.exe
233238
234239
- name: Fetch Git for Windows
235240
shell: msys2 {0}
@@ -254,13 +259,13 @@ jobs:
254259
run: |
255260
cd ./ci
256261
makensis fpm-installer.nsi
257-
move fpm-installer.exe fpm-installer-${{ env.VERSION }}.exe
262+
move fpm-installer.exe fpm-installer-${{ env.VERSION }}-gcc-${{ matrix.gcc_v }}.exe
258263
259264
- name: Upload artifact
260-
uses: actions/upload-artifact@v2
265+
uses: actions/upload-artifact@v4
261266
with:
262-
name: fpm-installer
263-
path: ci/fpm-installer-${{ env.VERSION }}.exe
267+
name: fpm-installer-gcc-${{ matrix.gcc_v }}
268+
path: ci/fpm-installer-${{ env.VERSION }}-gcc-${{ matrix.gcc_v }}.exe
264269

265270
upload-artifacts:
266271
if: ${{ github.event_name == 'release' && contains(github.ref, 'v') || github.event_name == 'push' }}
@@ -281,27 +286,27 @@ jobs:
281286
if: ${{ github.event_name == 'push' }}
282287

283288
- name: Download Artifacts
284-
uses: actions/download-artifact@v2
289+
uses: actions/download-artifact@v4
285290
with:
286-
path: ${{ github.workspace }} # This will download all files
291+
path: fpm-cd-artifacts
292+
pattern: 'fpm-*-gcc-12*'
293+
merge-multiple: true
287294

288295
- name: Normalize file names for continuous delivery
289296
if: ${{ github.event_name == 'push' }}
290297
run: |
291-
for output in fpm-*/fpm*; do
292-
pushd $(dirname "$output")
298+
cd fpm-cd-artifacts
299+
for output in fpm-*; do
293300
mv -v $(basename $output) $(basename $output | sed -E '${{ env.replace }}')
294-
popd
295301
done
296302
env:
297303
replace: 's/-([0-9]+\.[0-9]+\.[0-9]+-[0-9]+-g)?[0-9a-f]+//'
298304

299305
- name: Create SHA256 checksums
300306
run: |
301-
for output in fpm-*/fpm*; do
302-
pushd $(dirname "$output")
307+
cd fpm-cd-artifacts
308+
for output in fpm-*; do
303309
sha256sum $(basename "$output") | tee $(basename "$output").sha256
304-
popd
305310
done
306311
307312
- name: Move/Create continuous tag
@@ -315,7 +320,7 @@ jobs:
315320
if: ${{ github.event_name == 'release' || steps.deploy-on-push.outputs.result != 0 }}
316321
with:
317322
repo_token: ${{ secrets.GITHUB_TOKEN }}
318-
file: fpm-*/fpm*
323+
file: fpm-cd-artifacts/*
319324
file_glob: true
320325
tag: ${{ github.event_name == 'release' && github.ref || 'current'}}
321326
overwrite: true

.github/workflows/release.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
PREFIX: fpm-${{ env.VERSION }}/
3636

3737
- name: Upload artifact
38-
uses: actions/upload-artifact@v2
38+
uses: actions/upload-artifact@v4
3939
with:
4040
name: ${{ env.OUTPUT }}
4141
path: ${{ env.OUTPUT }}
@@ -104,7 +104,7 @@ jobs:
104104
${{ env.EXE }} build
105105
106106
- name: Upload artifact
107-
uses: actions/upload-artifact@v2
107+
uses: actions/upload-artifact@v4
108108
with:
109109
name: ${{ env.OUTPUT }}
110110
path: ${{ env.OUTPUT }}
@@ -128,27 +128,26 @@ jobs:
128128
if: ${{ github.event_name == 'push' }}
129129

130130
- name: Download Artifacts
131-
uses: actions/download-artifact@v2
131+
uses: actions/download-artifact@v4
132132
with:
133-
path: ${{ github.workspace }} # This will download all files
133+
path: fpm-cd-artifacts
134+
merge-multiple: true
134135

135136
- name: Normalize file names for continuous delivery
136137
if: ${{ github.event_name == 'push' }}
137138
run: |
138-
for output in fpm-*/fpm*; do
139-
pushd $(dirname "$output")
139+
cd fpm-cd-artifacts
140+
for output in fpm-*; do
140141
mv -v $(basename $output) $(basename $output | sed -E '${{ env.replace }}')
141-
popd
142142
done
143143
env:
144144
replace: 's/-([0-9]+\.[0-9]+\.[0-9]+-[0-9]+-g)?[0-9a-f]+//'
145145

146146
- name: Create SHA256 checksums
147147
run: |
148-
for output in fpm-*/fpm*; do
149-
pushd $(dirname "$output")
148+
cd fpm-cd-artifacts
149+
for output in fpm-*; do
150150
sha256sum $(basename "$output") | tee $(basename "$output").sha256
151-
popd
152151
done
153152
154153
- name: Move/Create continuous tag
@@ -162,7 +161,7 @@ jobs:
162161
uses: svenstaro/upload-release-action@v2
163162
with:
164163
repo_token: ${{ secrets.GITHUB_TOKEN }}
165-
file: fpm-*/fpm*
164+
file: fpm-cd-artifacts/*
166165
file_glob: true
167166
tag: ${{ github.event_name == 'release' && github.ref || 'current'}}
168167
overwrite: true

0 commit comments

Comments
 (0)