Skip to content

Commit

Permalink
Update a workflow file for GitHub Actions to create dmg format file
Browse files Browse the repository at this point in the history
  • Loading branch information
matsuo committed Sep 7, 2024
1 parent abd6185 commit cd502ae
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,18 @@ jobs:
OS=linux "./goss-linux-arm64" --gossfile tests/goss.yaml validate --format documentation
./fmcsadmin -v
EOF
- name: Create dmg format file for macOS
if: runner.os == 'macOS'
run: |
lipo -info "dist/fmcsadmin-${{ env.fmcsadmin_version }}-macos/fmcsadmin"
cd "dist/fmcsadmin-${{ env.fmcsadmin_version }}-macos"
pkgbuild --root . --identifier jp.co.emic.fmcsadmin --version "${{ env.fmcsadmin_version }}" --install-location /usr/local/bin ../fmcsadmin.pkg
cd ..
cp -p ../{LICENSE.txt,README.md,NOTICE.txt,release-notes.txt} .
cp -p ../macOS/{Distribution.xml,welcome.txt} .
productbuild --distribution Distribution.xml --resources . --package-path fmcsadmin.pkg "fmcsadmin-${{ env.fmcsadmin_version }}-unsigned.pkg"
cp -p "fmcsadmin-${{ env.fmcsadmin_version }}-unsigned.pkg" "fmcsadmin-${{ env.fmcsadmin_version }}.pkg"
mkdir macos-dist
mv "{fmcsadmin-${{ env.fmcsadmin_version }}.pkg,LICENSE.txt,README.md,NOTICE.txt,release-notes.txt}" macos-dist/
hdiutil create -srcfolder ./macos-dist/ -fs HFS+ -format UDZO -volname "fmcsadmin-${{ env.fmcsadmin_version }}" "fmcsadmin-${{ env.fmcsadmin_version }}-macos.dmg"

0 comments on commit cd502ae

Please sign in to comment.