Skip to content

Commit ba4a766

Browse files
committed
github_workflows: Redo tar process to remove redundant paths (#9)
* github_workflows: Redo tar process to remove redundant paths Re-implement build compression to avoid carrying toplevel dir into tar file
1 parent f949619 commit ba4a766

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ jobs:
2626

2727
- name: Build, Copy, and Compress armv7
2828
run: |
29+
BUILD_NAME=orion_armv7
2930
flutterpi_tool build --release
30-
mv build/flutter_assets orion_armv7
31-
tar -czvf orion_armv7.tar.gz orion_armv7
31+
mv build/flutter_assets $BUILD_NAME
32+
( cd $BUILD_NAME && tar -czvf $BUILD_NAME.tar.gz * )
33+
cp $BUILD_NAME/$BUILD_NAME.tar.gz $BUILD_NAME.tar.gz
3234
3335
- uses: actions/upload-artifact@v4.3.1
3436
with:
@@ -37,9 +39,11 @@ jobs:
3739

3840
- name: Build, Copy, and Compress aarch64
3941
run: |
42+
BUILD_NAME=orion_aarch64
4043
flutterpi_tool build --arch=arm64 --release
41-
mv build/flutter_assets orion_aarch64
42-
tar -czvf orion_aarch64.tar.gz orion_aarch64
44+
mv build/flutter_assets $BUILD_NAME
45+
( cd $BUILD_NAME && tar -czvf $BUILD_NAME.tar.gz * )
46+
cp $BUILD_NAME/$BUILD_NAME.tar.gz $BUILD_NAME.tar.gz
4347
4448
- uses: actions/upload-artifact@v4.3.1
4549
with:
@@ -48,9 +52,11 @@ jobs:
4852

4953
- name: Build, Copy, and Compress x64
5054
run: |
55+
BUILD_NAME=orion_x64
5156
flutterpi_tool build --arch=x64 --release
52-
mv build/flutter_assets orion_x64
53-
tar -czvf orion_x64.tar.gz orion_x64
57+
mv build/flutter_assets $BUILD_NAME
58+
( cd $BUILD_NAME && tar -czvf $BUILD_NAME.tar.gz * )
59+
cp $BUILD_NAME/$BUILD_NAME.tar.gz $BUILD_NAME.tar.gz
5460
5561
- uses: actions/upload-artifact@v4.3.1
5662
with:

0 commit comments

Comments
 (0)