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 d83a5e9
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,21 @@ 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" macos-dist/
mv {LICENSE.txt,README.md,NOTICE.txt,release-notes.txt} macos-dist/
cd macos-dist
cd ..
hdiutil create -srcfolder ./macos-dist/ -fs HFS+ -format UDZO -volname "fmcsadmin-${{ env.fmcsadmin_version }}" "fmcsadmin-${{ env.fmcsadmin_version }}-macos.dmg"

0 comments on commit d83a5e9

Please sign in to comment.