customize mac dmg
This commit is contained in:
@@ -27,7 +27,7 @@ on:
|
||||
required: true
|
||||
jobs:
|
||||
build_and_upload_mac:
|
||||
name: Build & Upload Mac Artifacts
|
||||
name: Mac Build & Upload
|
||||
runs-on: ${{ matrix.os }}
|
||||
if: contains(github.event.head_commit.message, '[no build]') == false
|
||||
strategy:
|
||||
@@ -69,14 +69,35 @@ jobs:
|
||||
echo "RELEASE_NAME=${release_name}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: dotnet publish ErsatzTV/ErsatzTV.csproj --framework net6.0 --runtime "${{ matrix.target }}" -c Release -o publish -p:InformationalVersion="${{ inputs.release_version }}-${{ matrix.target }}" -p:EnableCompressionInSingleFile=true -p:DebugType=Embedded -p:PublishSingleFile=true --self-contained true
|
||||
|
||||
- name: Bundle
|
||||
shell: bash
|
||||
run: |
|
||||
dotnet msbuild ErsatzTV/ErsatzTV.csproj -t:BundleApp -p:RuntimeIdentifier="${{ matrix.target }}" -p:CFBundleVersion="${{ inputs.info_version }}" -p:Configuration=Release -p:CFBundleShortVersionString="${{ inputs.info_version }}" -p:InformationalVersion="${{ inputs.release_version }}-${{ matrix.target }}" -p:PublishDir=$(pwd)/release
|
||||
cp scripts/macOS/launcher.sh release/ErsatzTV.app/Contents/MacOS/
|
||||
plutil -replace CFBundleShortVersionString -string "${{ inputs.info_version }}" scripts/macOS/Info.plist
|
||||
plutil -replace CFBundleVersion -string "${{ inputs.info_version }}" scripts/macOS/Info.plist
|
||||
scripts/macOS/bundle.sh
|
||||
|
||||
- name: Sign
|
||||
shell: bash
|
||||
run: scripts/macOS/sign.sh
|
||||
|
||||
- name: Create DMG
|
||||
shell: bash
|
||||
run: |
|
||||
brew install create-dmg
|
||||
create-dmg \
|
||||
--volname "ErsatzTV" \
|
||||
--volicon "artwork/ErsatzTV.icns" \
|
||||
--window-pos 200 120 \
|
||||
--window-size 800 400 \
|
||||
--icon-size 100 \
|
||||
--icon "ErsatzTV.app" 200 190 \
|
||||
--hide-extension "ErsatzTV.app" \
|
||||
--app-drop-link 600 185 \
|
||||
"ErsatzTV.dmg" \
|
||||
"ErsatzTV.app/"
|
||||
|
||||
- name: Notarize
|
||||
shell: bash
|
||||
@@ -91,8 +112,9 @@ jobs:
|
||||
- name: Cleanup
|
||||
shell: bash
|
||||
run: |
|
||||
mv release/ErsatzTV.dmg "${{ env.RELEASE_NAME }}.dmg"
|
||||
rm -r release
|
||||
mv ErsatzTV.dmg "${{ env.RELEASE_NAME }}.dmg"
|
||||
rm -r publish
|
||||
rm -r ErsatzTV.app
|
||||
|
||||
- name: Delete old release assets
|
||||
uses: mknejp/delete-release-assets@v1
|
||||
@@ -113,7 +135,7 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.gh_token }}
|
||||
build_and_upload:
|
||||
name: Build & Upload Artifacts
|
||||
name: Build & Upload
|
||||
runs-on: ${{ matrix.os }}
|
||||
if: contains(github.event.head_commit.message, '[no build]') == false
|
||||
strategy:
|
||||
@@ -153,7 +175,7 @@ jobs:
|
||||
echo "RELEASE_NAME=${release_name}" >> $GITHUB_ENV
|
||||
|
||||
# Build everything
|
||||
dotnet publish ErsatzTV/ErsatzTV.csproj --framework net6.0 --runtime "${{ matrix.target }}" -c Release -o "$release_name" /property:InformationalVersion="${{ inputs.release_version }}-${{ matrix.target }}" /property:EnableCompressionInSingleFile=true /property:DebugType=Embedded /property:PublishSingleFile=true --self-contained true
|
||||
dotnet publish ErsatzTV/ErsatzTV.csproj --framework net6.0 --runtime "${{ matrix.target }}" -c Release -o "$release_name" -p:InformationalVersion="${{ inputs.release_version }}-${{ matrix.target }}" -p:EnableCompressionInSingleFile=true -p:DebugType=Embedded -p:PublishSingleFile=true --self-contained true
|
||||
|
||||
# Pack files
|
||||
if [ "${{ matrix.kind }}" == "windows" ]; then
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
{
|
||||
"source" : ["./release/ErsatzTV.app"],
|
||||
"bundle_id" : "com.jasongdove.ersatztv",
|
||||
"notarize": [{
|
||||
"path": "./ErsatzTV.dmg",
|
||||
"bundle_id": "com.jasongdove.ersatztv",
|
||||
"staple": true
|
||||
}],
|
||||
|
||||
"apple_id": {
|
||||
"password": "@env:AC_PASSWORD"
|
||||
},
|
||||
"sign" :{
|
||||
"application_identity" : "C3BBCFB2D6851FF0DCA6CAC06A3EF1ECE71F9FFF",
|
||||
"entitlements_file": "./scripts/macOS/ErsatzTV.entitlements"
|
||||
},
|
||||
"dmg" :{
|
||||
"output_path": "./release/ErsatzTV.dmg",
|
||||
"volume_name": "ErsatzTV"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,5 +6,11 @@
|
||||
<true/>
|
||||
<key>com.apple.security.automation.apple-events</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>ErsatzTV</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>launcher.sh</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>ErsatzTV.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.jasongdove.ersatztv</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>ErsatzTV</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.3.7-alpha</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.3.7-alpha</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<true/>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#! /bin/bash
|
||||
|
||||
SCRIPT_FOLDER=$(dirname ${BASH_SOURCE[0]})
|
||||
REPO_ROOT="$SCRIPT_FOLDER/../.."
|
||||
|
||||
APP_NAME="$REPO_ROOT/ErsatzTV.app"
|
||||
PUBLISH_OUTPUT_DIRECTORY="$REPO_ROOT/publish/."
|
||||
INFO_PLIST="$SCRIPT_FOLDER/Info.plist"
|
||||
ICON_SOURCE="$REPO_ROOT/artwork/ErsatzTV.icns"
|
||||
ICON_FILE="ErsatzTV.icns"
|
||||
|
||||
if [ -d "$APP_NAME" ]
|
||||
then
|
||||
rm -rf "$APP_NAME"
|
||||
fi
|
||||
|
||||
mkdir "$APP_NAME"
|
||||
|
||||
mkdir "$APP_NAME/Contents"
|
||||
mkdir "$APP_NAME/Contents/MacOS"
|
||||
mkdir "$APP_NAME/Contents/Resources"
|
||||
|
||||
cp "$INFO_PLIST" "$APP_NAME/Contents/Info.plist"
|
||||
cp "$ICON_SOURCE" "$APP_NAME/Contents/Resources/$ICON_FILE"
|
||||
cp -a "$PUBLISH_OUTPUT_DIRECTORY" "$APP_NAME/Contents/MacOS"
|
||||
cp "$SCRIPT_FOLDER/launcher.sh" "$APP_NAME/Contents/MacOS/"
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#! /bin/bash
|
||||
|
||||
SCRIPT_FOLDER=$(dirname ${BASH_SOURCE[0]})
|
||||
REPO_ROOT="$SCRIPT_FOLDER/../.."
|
||||
|
||||
DMG_NAME="$REPO_ROOT/ErsatzTV.dmg"
|
||||
ENTITLEMENTS="$SCRIPT_FOLDER/ErsatzTV.entitlements"
|
||||
SIGNING_IDENTITY="C3BBCFB2D6851FF0DCA6CAC06A3EF1ECE71F9FFF"
|
||||
|
||||
codesign --force --timestamp --options=runtime --entitlements "$ENTITLEMENTS" --sign "$SIGNING_IDENTITY" "$DMG_NAME"
|
||||
@@ -1,6 +1,10 @@
|
||||
#! /bin/bash
|
||||
APP_NAME="release/ErsatzTV.app"
|
||||
ENTITLEMENTS="scripts/macOS/ErsatzTV.entitlements"
|
||||
#! /bin/bash
|
||||
|
||||
SCRIPT_FOLDER=$(dirname ${BASH_SOURCE[0]})
|
||||
REPO_ROOT="$SCRIPT_FOLDER/../.."
|
||||
|
||||
APP_NAME="$REPO_ROOT/ErsatzTV.app"
|
||||
ENTITLEMENTS="$SCRIPT_FOLDER/ErsatzTV.entitlements"
|
||||
SIGNING_IDENTITY="C3BBCFB2D6851FF0DCA6CAC06A3EF1ECE71F9FFF"
|
||||
|
||||
find "$APP_NAME/Contents/MacOS/"|while read fname; do
|
||||
|
||||
Reference in New Issue
Block a user