@@ -139,49 +139,45 @@ jobs:
139139 ls -lah "${APP_BUNDLE}/Contents/MacOS/"
140140 ls -lah "${APP_BUNDLE}/Contents/Resources/" || true
141141
142- - name : Build .pkg installer
142+ - name : Ad-hoc sign app bundle
143+ run : |
144+ APP_NAME="Flow"
145+ codesign --force --deep --sign - "${APP_NAME}.app"
146+ xattr -rc "${APP_NAME}.app"
147+ codesign -dv --verbose=4 "${APP_NAME}.app" || true
148+
149+ - name : Build .dmg installer
143150 env :
144151 VERSION : ${{ steps.version.outputs.version }}
145152 run : |
146153 APP_NAME="Flow"
147- PKG_NAME="Flow-${VERSION}-macOS-universal.pkg"
148- BUNDLE_ID="com.flowwispr.flow"
149-
150- # Build component package
151- pkgbuild \
152- --identifier "${BUNDLE_ID}" \
153- --version "${VERSION}" \
154- --install-location "/Applications" \
155- --component "./${APP_NAME}.app" \
156- "Flow-component.pkg"
157-
158- # Create distribution package
159- productbuild \
160- --package "Flow-component.pkg" \
161- --identifier "${BUNDLE_ID}" \
162- "${PKG_NAME}"
154+ DMG_NAME="Flow-${VERSION}-macOS-universal.dmg"
163155
164- # Clean up component package
165- rm "Flow-component.pkg"
156+ hdiutil create \
157+ -volname "${APP_NAME}" \
158+ -srcfolder "${APP_NAME}.app" \
159+ -ov \
160+ -format UDZO \
161+ "${DMG_NAME}"
166162
167- echo "Package created:"
168- ls -lh "${PKG_NAME }"
163+ echo "DMG created:"
164+ ls -lh "${DMG_NAME }"
169165
170- # Store package name for later steps
171- echo "pkg_name =${PKG_NAME }" >> $GITHUB_ENV
166+ # Store dmg name for later steps
167+ echo "dmg_name =${DMG_NAME }" >> $GITHUB_ENV
172168
173169 - name : Generate checksum
174170 run : |
175- shasum -a 256 "${{ env.pkg_name }}" > "${{ env.pkg_name }}.sha256"
176- cat "${{ env.pkg_name }}.sha256"
171+ shasum -a 256 "${{ env.dmg_name }}" > "${{ env.dmg_name }}.sha256"
172+ cat "${{ env.dmg_name }}.sha256"
177173
178174 - name : Create GitHub Release
179175 uses : softprops/action-gh-release@v1
180176 if : startsWith(github.ref, 'refs/tags/')
181177 with :
182178 files : |
183- ${{ env.pkg_name }}
184- ${{ env.pkg_name }}.sha256
179+ ${{ env.dmg_name }}
180+ ${{ env.dmg_name }}.sha256
185181 draft : false
186182 generate_release_notes : true
187183 fail_on_unmatched_files : true
@@ -194,6 +190,6 @@ jobs:
194190 with :
195191 name : flow-macos-universal
196192 path : |
197- ${{ env.pkg_name }}
198- ${{ env.pkg_name }}.sha256
193+ ${{ env.dmg_name }}
194+ ${{ env.dmg_name }}.sha256
199195 retention-days : 7
0 commit comments