Skip to content

Commit

Permalink
Fix: correctly create dmg for mac installer
Browse files Browse the repository at this point in the history
The ci runner's temp dir was being used as the
source for dmg creation, meaning that everything
in temp was being put in pushed out for release.
  • Loading branch information
JoseDiazRohena committed Feb 24, 2023
1 parent 4a090be commit c03d514
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/cmake_ctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,13 @@ jobs:
PRODUCT: ${{ env.PROJECT_NAME }}
INPUT_DIR: ${{ env.ARTIFACTS_PATH }}
RESOURCES_DIR: ${{ env.RESOURCES_DIR }}
OUTPUT_DIR: ${{ runner.temp }}
OUTPUT_DIR: "${{ runner.temp }}/mac_installer_output"
VERSION: ${{ env.VERSION_NUMBER }}
SIGNING_ID: ${{ secrets.DEVELOPER_ID_INSTALLER}}
run: |
mkdir -p "$OUTPUT_DIR"
# creates a signed package and outputs it in a disk image, ready for notarization and staple.
${{env.SCRIPTS_DIR}}/make-mac-installer.sh "$PRODUCT" \
"$INPUT_DIR" \
Expand All @@ -168,7 +170,7 @@ jobs:
if: ${{ matrix.name == 'macOS' }}
run: |
hdiutil create /tmp/tmp.dmg -ov -volname "$OUTPUT_BASE_FILENAME" -fs HFS+ -srcfolder ${{ runner.temp }}
hdiutil create /tmp/tmp.dmg -ov -volname "${{ env.OUTPUT_FILENAME }}" -fs HFS+ -srcfolder "${{ runner.temp }}/mac_installer_output/"
hdiutil convert /tmp/tmp.dmg -format UDZO -o "${{ runner.temp }}/${{ env.OUTPUT_FILENAME }}.dmg"
- name: Notarize and Staple (macOS)
Expand Down
1 change: 0 additions & 1 deletion scripts/make-mac-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,4 @@ echo --- Main Package Created ---
popd

# move completed package to output directory
mkdir -p "${TMPDIR}/${PRODUCTFILE}"
mv "${TMPDIR}/${OUTPUT_BASE_FILENAME}.pkg" "${TARGET_DIR}"

0 comments on commit c03d514

Please sign in to comment.