Skip to content

Commit

Permalink
Merge pull request #23 from creamlike1024/remove_dmg
Browse files Browse the repository at this point in the history
ci: remove macOS dmg build
  • Loading branch information
ChenDoXiu authored Jan 1, 2025
2 parents 4487df6 + f9e20f0 commit fa29423
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions .github/workflows/flutter-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
build-apk:
name: 编译android
runs-on: ubuntu-latest
needs: [ pre-build ]
needs: [pre-build]
steps:
- name: 设置Flutter环境
uses: subosito/flutter-action@v2
Expand All @@ -58,7 +58,6 @@ jobs:
distribution: "adopt"
java-version: "21"


- name: 运行代码生成器
run: dart run build_runner build

Expand All @@ -82,7 +81,7 @@ jobs:
build-linux:
name: 编译linux
runs-on: ubuntu-latest
needs: [ pre-build ]
needs: [pre-build]
steps:
- name: 拉取代码
uses: actions/checkout@v4
Expand Down Expand Up @@ -121,7 +120,7 @@ jobs:
build-windows:
name: 编译windows
runs-on: windows-latest
needs: [ pre-build ]
needs: [pre-build]
steps:
- name: 拉取代码
uses: actions/checkout@v4
Expand All @@ -137,7 +136,6 @@ jobs:
- name: 启动windows桌面
run: flutter config --enable-windows-desktop


- name: 运行代码生成器
run: dart run build_runner build

Expand All @@ -159,7 +157,7 @@ jobs:
build-macos:
name: 编译macOS
runs-on: macos-latest
needs: [ pre-build ]
needs: [pre-build]
steps:
- name: 拉取代码
uses: actions/checkout@v4
Expand All @@ -186,27 +184,17 @@ jobs:
cd build/macos/Build/Products/Release
zip -rq MoeKey-${{ needs.pre-build.outputs.APP_VERSION }}-macOS-universal-release.zip MoeKey.app
mv MoeKey-${{ needs.pre-build.outputs.APP_VERSION }}-macOS-universal-release.zip $GITHUB_WORKSPACE
mkdir dmg && cp -r MoeKey.app dmg
hdiutil create -volname "MoeKey" -srcfolder dmg -ov -format UDRW MoeKey.dmg
hdiutil attach MoeKey.dmg
cp $GITHUB_WORKSPACE/assets/favicon.icns /Volumes/MoeKey/.VolumeIcon.icns
SetFile -c icnC /Volumes/MoeKey/.VolumeIcon.icns
SetFile -a C /Volumes/MoeKey
hdiutil detach /Volumes/MoeKey
hdiutil convert MoeKey.dmg -format UDZO -o MoeKey-${{ needs.pre-build.outputs.APP_VERSION }}-macOS-universal-release.dmg
mv MoeKey-${{ needs.pre-build.outputs.APP_VERSION }}-macOS-universal-release.dmg $GITHUB_WORKSPACE
- name: 上传到工作流程
uses: actions/upload-artifact@v4
with:
name: build-macos
path: |
MoeKey-${{ needs.pre-build.outputs.APP_VERSION }}-macOS-universal-release.zip
MoeKey-${{ needs.pre-build.outputs.APP_VERSION }}-macOS-universal-release.dmg
release:
name: 上传包
needs: [ build-apk, build-linux, build-windows, build-macos, pre-build ]
needs: [build-apk, build-linux, build-windows, build-macos, pre-build]
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down

0 comments on commit fa29423

Please sign in to comment.