Skip to content

Commit

Permalink
optimized code
Browse files Browse the repository at this point in the history
  • Loading branch information
leavesCZY committed Jun 7, 2024
1 parent 089b166 commit 912d1a2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ jobs:
name: rename File
run: |
mv ./composeApp/build/compose/binaries/main-release/exe/compose-multiplatform-tetris-1.0.0.exe ./composeApp/build/compose/binaries/main-release/exe/compose-multiplatform-tetris-windows-x64.exe
mv ./composeApp/build/compose/binaries/main-release/msi/compose-multiplatform-tetris-1.0.0.msi ./composeApp/build/compose/binaries/main-release/msi/compose-multiplatform-tetris-windows-x64.msi
- if: matrix.os == 'windows-latest'
name: zip AppImage
Expand All @@ -76,24 +75,21 @@ jobs:
name: rename File
run: |
mv /home/runner/work/compose-multiplatform-tetris/compose-multiplatform-tetris/composeApp/build/compose/binaries/main-release/deb/compose-multiplatform-tetris_1.0.0_amd64.deb /home/runner/work/compose-multiplatform-tetris/compose-multiplatform-tetris/composeApp/build/compose/binaries/main-release/deb/compose-multiplatform-tetris-linux-amd64.deb
mv /home/runner/work/compose-multiplatform-tetris/compose-multiplatform-tetris/composeApp/build/compose/binaries/main-release/rpm/compose-multiplatform-tetris-1.0.0-1.x86_64.rpm /home/runner/work/compose-multiplatform-tetris/compose-multiplatform-tetris/composeApp/build/compose/binaries/main-release/rpm/compose-multiplatform-tetris-linux-x86_64.rpm
- if: matrix.os == 'macos-13'
name: rename File
run: |
mv /Users/runner/work/compose-multiplatform-tetris/compose-multiplatform-tetris/composeApp/build/compose/binaries/main-release/dmg/compose-multiplatform-tetris-1.0.0.dmg /Users/runner/work/compose-multiplatform-tetris/compose-multiplatform-tetris/composeApp/build/compose/binaries/main-release/dmg/compose-multiplatform-tetris-macos-x64.dmg
mv /Users/runner/work/compose-multiplatform-tetris/compose-multiplatform-tetris/composeApp/build/compose/binaries/main-release/pkg/compose-multiplatform-tetris-1.0.0.pkg /Users/runner/work/compose-multiplatform-tetris/compose-multiplatform-tetris/composeApp/build/compose/binaries/main-release/pkg/compose-multiplatform-tetris-macos-x64.pkg
mv /Users/runner/work/compose-multiplatform-tetris/compose-multiplatform-tetris/composeApp/build/compose/binaries/main-release/dmg/compose-multiplatform-tetris-1.0.0.dmg /Users/runner/work/compose-multiplatform-tetris/compose-multiplatform-tetris/composeApp/build/compose/binaries/main-release/dmg/compose-multiplatform-tetris-mac-x64.dmg
- if: matrix.os == 'macos-14'
name: rename File
run: |
mv /Users/runner/work/compose-multiplatform-tetris/compose-multiplatform-tetris/composeApp/build/compose/binaries/main-release/dmg/compose-multiplatform-tetris-1.0.0.dmg /Users/runner/work/compose-multiplatform-tetris/compose-multiplatform-tetris/composeApp/build/compose/binaries/main-release/dmg/compose-multiplatform-tetris-macos-arm64.dmg
mv /Users/runner/work/compose-multiplatform-tetris/compose-multiplatform-tetris/composeApp/build/compose/binaries/main-release/pkg/compose-multiplatform-tetris-1.0.0.pkg /Users/runner/work/compose-multiplatform-tetris/compose-multiplatform-tetris/composeApp/build/compose/binaries/main-release/pkg/compose-multiplatform-tetris-macos-arm64.pkg
mv /Users/runner/work/compose-multiplatform-tetris/compose-multiplatform-tetris/composeApp/build/compose/binaries/main-release/dmg/compose-multiplatform-tetris-1.0.0.dmg /Users/runner/work/compose-multiplatform-tetris/compose-multiplatform-tetris/composeApp/build/compose/binaries/main-release/dmg/compose-multiplatform-tetris-mac-arm64.dmg
- name: create a release
uses: ncipollo/release-action@v1
with:
artifacts: "**/*.apk,**/*.exe,**/*.msi,**/compose-multiplatform-tetris-windows-x64.zip,**/*.deb,**/*.rpm,**/*.dmg,**/*.pkg"
artifacts: "**/compose-multiplatform-tetris-android.apk,**/compose-multiplatform-tetris-windows-x64.exe,**/compose-multiplatform-tetris-windows-x64.zip,**/*.deb,**/*.dmg"
body: "create by workflows"
allowUpdates: true
artifactErrorsFailBuild: false
Expand Down
6 changes: 3 additions & 3 deletions composeApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,15 @@ compose.desktop {
modules = arrayListOf("java.desktop")
when (currentOS) {
OS.Windows -> {
targetFormats(TargetFormat.AppImage, TargetFormat.Exe, TargetFormat.Msi)
targetFormats(TargetFormat.AppImage, TargetFormat.Exe)
}

OS.MacOS -> {
targetFormats(TargetFormat.Dmg, TargetFormat.Pkg)
targetFormats(TargetFormat.Dmg)
}

OS.Linux -> {
targetFormats(TargetFormat.Deb, TargetFormat.Rpm)
targetFormats(TargetFormat.Deb)
}
}
packageName = mPackageName
Expand Down
2 changes: 1 addition & 1 deletion workflows-trigger.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
trigger=2
trigger=3

0 comments on commit 912d1a2

Please sign in to comment.