macos build action

Create the DMG file with Applications shortcut
This commit is contained in:
boa-z
2024-11-02 23:33:38 +08:00
parent 77ef0fb404
commit f2335894a4

View File

@@ -27,16 +27,16 @@ jobs:
- name: Build Flutter macOS App - name: Build Flutter macOS App
run: flutter build macos --release run: flutter build macos --release
# Step 3: Create the DMG file
# Step 4: Create the DMG file
- name: Create DMG - name: Create DMG
run: | run: |
mkdir -p dist mkdir -p dist
hdiutil create -volname "venera" -srcfolder build/macos/Build/Products/Release/venera.app -ov -format UDZO "dist/venera.dmg" mkdir -p dist/dmg_contents
cp -R build/macos/Build/Products/Release/venera.app dist/dmg_contents/
ln -s /Applications dist/dmg_contents/Applications
hdiutil create -volname "venera" -srcfolder dist/dmg_contents -ov -format UDZO "dist/venera.dmg"
# Step 4: Attach and upload artifacts (optional)
# Step 8: Attach and upload artifacts (optional)
- name: Upload DMG - name: Upload DMG
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with: