Skip to content

Commit 4f153ff

Browse files
committed
GHA remove top level dir from release bundle files
1 parent 8481e4e commit 4f153ff

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

.github/workflows/build.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,9 @@ jobs:
242242
# To preserve executable bit on files (GH artifacts are automatically zipped and executable bit is lost)
243243
- name: 'Tar dist files'
244244
shell: bash
245-
working-directory: fujinet-pc-launcher
245+
working-directory: fujinet-pc-launcher/dist
246246
run: |
247-
mv dist fujinet-pc-bundle
248-
tar -czf fujinet-pc-bundle_${{ steps.version.outputs.release }}_${{ matrix.target }}.tgz fujinet-pc-bundle
247+
tar -czf ../fujinet-pc-bundle_${{ steps.version.outputs.release }}_${{ matrix.target }}.tgz *
249248
250249
- name: Upload build artifact
251250
uses: actions/upload-artifact@v3
@@ -269,12 +268,26 @@ jobs:
269268
- name: Display structure of downloaded files
270269
run: ls -lR release
271270

272-
- name: Zip release files
271+
- name: 'Zip release files (scripts and windows)'
273272
working-directory: release
274273
run: |
275-
for D in fujinet-pc-scripts_*; do zip -r ${D}.zip $D; tar -czvf ${D}.tar.gz $D; done
276-
for D in fujinet-pc-bundle_*windows*; do (cd $D; F=(fujinet-pc-bundle_*.tgz); tar -xzvf $F; zip -r ${F%.*}.zip fujinet-pc-bundle); done
277-
rm -f fujinet-pc-bundle_*windows*/fujinet-pc-bundle_*.tgz
274+
for D in fujinet-pc-scripts_*
275+
do
276+
zip -r ${D}.zip $D
277+
tar -czvf ${D}.tar.gz $D
278+
done
279+
for D in fujinet-pc-bundle_*windows*
280+
do
281+
(
282+
cd $D
283+
F=(fujinet-pc-bundle_*.tgz)
284+
mkdir dist
285+
tar -xzvf $F -C dist
286+
rm -f $F
287+
cd dist
288+
zip -r ../${F%.*}.zip *
289+
)
290+
done
278291
279292
- name: Release
280293
uses: softprops/action-gh-release@v1
@@ -285,5 +298,5 @@ jobs:
285298
files: |
286299
release/fujinet-pc-scripts_*.tar.gz
287300
release/fujinet-pc-scripts_*.zip
288-
release/fujinet-pc-bundle_*/fujinet-pc-bundle_*.zip
289301
release/fujinet-pc-bundle_*/fujinet-pc-bundle_*.tgz
302+
release/fujinet-pc-bundle_*/fujinet-pc-bundle_*.zip

0 commit comments

Comments
 (0)