Skip to content

Commit

Permalink
减少CI打包的安装包大小
Browse files Browse the repository at this point in the history
  • Loading branch information
ywmoyue committed Apr 8, 2024
1 parent c94711f commit 40c2eaa
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,13 @@ jobs:
run: cp C:\Package\安装教程.pdf ${{env.UWP_Project_Directory}}\AppPackages\${{env.AppName}}_${{github.event.inputs.version}}_x64_Test\安装教程.pdf
if: github.event.inputs.enableX64 == 'true'

- name: Remove x64 useless files
run: |
cd ${{env.UWP_Project_Directory}}\AppPackages\${{env.AppName}}_${{github.event.inputs.version}}_x64_Test
rm -r -fo *.appxsym
cd Dependencies
rm -r -fo arm,arm64,x86
- name: Create x64 archive
run: Compress-Archive -Path ${{env.UWP_Project_Directory}}\AppPackages\${{env.AppName}}_${{github.event.inputs.version}}_x64_Test -DestinationPath C:\Package\${{env.AppName}}_${{github.event.inputs.version}}_x64.zip
if: github.event.inputs.enableX64 == 'true'
Expand Down Expand Up @@ -143,6 +150,13 @@ jobs:
run: cp C:\Package\安装教程.pdf ${{env.UWP_Project_Directory}}\AppPackages\${{env.AppName}}_${{github.event.inputs.version}}_x86_Test\安装教程.pdf
if: github.event.inputs.enableX86 == 'true'

- name: Remove x86 useless files
run: |
cd ${{env.UWP_Project_Directory}}\AppPackages\${{env.AppName}}_${{github.event.inputs.version}}_x86_Test
rm -r -fo *.appxsym
cd Dependencies
rm -r -fo arm,arm64,x64
- name: Create x86 archive
run: Compress-Archive -Path ${{env.UWP_Project_Directory}}\AppPackages\${{env.AppName}}_${{github.event.inputs.version}}_x86_Test -DestinationPath C:\Package\${{env.AppName}}_${{github.event.inputs.version}}_x86.zip
if: github.event.inputs.enableX86 == 'true'
Expand Down Expand Up @@ -170,6 +184,13 @@ jobs:
run: cp C:\Package\安装教程.pdf ${{env.UWP_Project_Directory}}\AppPackages\${{env.AppName}}_${{github.event.inputs.version}}_ARM64_Test\安装教程.pdf
if: github.event.inputs.enableArm64 == 'true'

- name: Remove arm64 useless files
run: |
cd ${{env.UWP_Project_Directory}}\AppPackages\${{env.AppName}}_${{github.event.inputs.version}}_ARM64_Test
rm -r -fo *.appxsym
cd Dependencies
rm -r -fo arm,x64,x86
- name: Create ARM64 archive
run: Compress-Archive -Path ${{env.UWP_Project_Directory}}\AppPackages\${{env.AppName}}_${{github.event.inputs.version}}_ARM64_Test -DestinationPath C:\Package\${{env.AppName}}_${{github.event.inputs.version}}_ARM64.zip
if: github.event.inputs.enableArm64 == 'true'
Expand Down Expand Up @@ -197,6 +218,13 @@ jobs:
run: cp C:\Package\安装教程.pdf ${{env.UWP_Project_Directory}}\AppPackages\${{env.AppName}}_${{github.event.inputs.version}}_ARM_Test\安装教程.pdf
if: github.event.inputs.enableArm32 == 'true'

- name: Remove arm32 useless files
run: |
cd ${{env.UWP_Project_Directory}}\AppPackages\${{env.AppName}}_${{github.event.inputs.version}}_ARM_Test
rm -r -fo *.appxsym
cd Dependencies
rm -r -fo arm64,x64,x86
- name: Create ARM32 archive
run: Compress-Archive -Path ${{env.UWP_Project_Directory}}\AppPackages\${{env.AppName}}_${{github.event.inputs.version}}_ARM_Test -DestinationPath C:\Package\${{env.AppName}}_${{github.event.inputs.version}}_ARM.zip
if: github.event.inputs.enableArm32 == 'true'
Expand Down

0 comments on commit 40c2eaa

Please sign in to comment.