Skip to content

Commit a663b5d

Browse files
committed
ci: fix CD artifact creation
1 parent f796069 commit a663b5d

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

.github/workflows/CI.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -288,26 +288,24 @@ jobs:
288288
- name: Download Artifacts
289289
uses: actions/download-artifact@v4
290290
with:
291-
path: ${{ github.workspace }}
291+
path: fpm-cd-artifacts
292292
merge-multiple: true
293293

294294
- name: Normalize file names for continuous delivery
295295
if: ${{ github.event_name == 'push' }}
296296
run: |
297-
for output in fpm-*/fpm*; do
298-
pushd $(dirname "$output")
297+
cd fpm-cd-artifacts
298+
for output in fpm-*; do
299299
mv -v $(basename $output) $(basename $output | sed -E '${{ env.replace }}')
300-
popd
301300
done
302301
env:
303302
replace: 's/-([0-9]+\.[0-9]+\.[0-9]+-[0-9]+-g)?[0-9a-f]+//'
304303

305304
- name: Create SHA256 checksums
306305
run: |
307-
for output in fpm-*/fpm*; do
308-
pushd $(dirname "$output")
306+
cd fpm-cd-artifacts
307+
for output in fpm-*; do
309308
sha256sum $(basename "$output") | tee $(basename "$output").sha256
310-
popd
311309
done
312310
313311
- name: Move/Create continuous tag
@@ -321,7 +319,7 @@ jobs:
321319
if: ${{ github.event_name == 'release' || steps.deploy-on-push.outputs.result != 0 }}
322320
with:
323321
repo_token: ${{ secrets.GITHUB_TOKEN }}
324-
file: fpm-*/fpm*
322+
file: fpm-cd-artifacts/*
325323
file_glob: true
326324
tag: ${{ github.event_name == 'release' && github.ref || 'current'}}
327325
overwrite: true

.github/workflows/release.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,26 +130,24 @@ jobs:
130130
- name: Download Artifacts
131131
uses: actions/download-artifact@v4
132132
with:
133-
path: ${{ github.workspace }}
133+
path: fpm-cd-artifacts
134134
merge-multiple: true
135135

136136
- name: Normalize file names for continuous delivery
137137
if: ${{ github.event_name == 'push' }}
138138
run: |
139-
for output in fpm-*/fpm*; do
140-
pushd $(dirname "$output")
139+
cd fpm-cd-artifacts
140+
for output in fpm-*; do
141141
mv -v $(basename $output) $(basename $output | sed -E '${{ env.replace }}')
142-
popd
143142
done
144143
env:
145144
replace: 's/-([0-9]+\.[0-9]+\.[0-9]+-[0-9]+-g)?[0-9a-f]+//'
146145

147146
- name: Create SHA256 checksums
148147
run: |
149-
for output in fpm-*/fpm*; do
150-
pushd $(dirname "$output")
148+
cd fpm-cd-artifacts
149+
for output in fpm-*; do
151150
sha256sum $(basename "$output") | tee $(basename "$output").sha256
152-
popd
153151
done
154152
155153
- name: Move/Create continuous tag
@@ -163,7 +161,7 @@ jobs:
163161
uses: svenstaro/upload-release-action@v2
164162
with:
165163
repo_token: ${{ secrets.GITHUB_TOKEN }}
166-
file: fpm-*/fpm*
164+
file: fpm-cd-artifacts/*
167165
file_glob: true
168166
tag: ${{ github.event_name == 'release' && github.ref || 'current'}}
169167
overwrite: true

0 commit comments

Comments
 (0)