Use *.dmg format to distribute on macOS
Pack up dmg files Cooperate with fastlane config Fix directory Put off notarization Diagnose dmg Try notarize Check notarize Duh Fix Better codesigning Last try
This commit is contained in:
57
.github/actions/build-macos/action.yml
vendored
57
.github/actions/build-macos/action.yml
vendored
@@ -30,8 +30,10 @@ runs:
|
|||||||
- name: Checkout template
|
- name: Checkout template
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
|
# TODO change ref
|
||||||
repository: '26F-Studio/Techmino-macOS'
|
repository: '26F-Studio/Techmino-macOS'
|
||||||
path: 'Techmino-macOS'
|
path: 'Techmino-macOS'
|
||||||
|
ref: 'dmg'
|
||||||
- name: Download ColdClear
|
- name: Download ColdClear
|
||||||
uses: ./.github/actions/get-cc
|
uses: ./.github/actions/get-cc
|
||||||
with:
|
with:
|
||||||
@@ -79,19 +81,54 @@ runs:
|
|||||||
lane: 'make_safe'
|
lane: 'make_safe'
|
||||||
subdirectory: 'Techmino-macOS'
|
subdirectory: 'Techmino-macOS'
|
||||||
env:
|
env:
|
||||||
APPLE_KEY_ID: '${{ inputs.APPLE_KEY_ID }}'
|
# TODO: Bundle ID
|
||||||
APPLE_ISSUER_ID: '${{ inputs.APPLE_ISSUER_ID }}'
|
APPLE_KEY_ID: '${{ inputs.APPLE_KEY_ID }}'
|
||||||
APPLE_KEY_CONTENT: '${{ inputs.APPLE_KEY_CONTENT }}'
|
APPLE_ISSUER_ID: '${{ inputs.APPLE_ISSUER_ID }}'
|
||||||
- name: Check codesign
|
APPLE_KEY_CONTENT: '${{ inputs.APPLE_KEY_CONTENT }}'
|
||||||
|
NOTARIZE_OBJECT: 'Techmino.app'
|
||||||
|
BUNDLE_ID: 'org.26f-studio.Techmino.dev'
|
||||||
|
- name: Create DMG file
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
codesign -dvvv Techmino-macOS/Techmino.app
|
brew install create-dmg
|
||||||
- name: Check for access
|
create-dmg \
|
||||||
|
--volname "Techmino for MacOS" \
|
||||||
|
--volicon "./.github/build/macOS/icon.icns" \
|
||||||
|
--window-pos 200 120 \
|
||||||
|
--window-size 800 400 \
|
||||||
|
--icon-size 100 \
|
||||||
|
--icon "Techmino.app" 200 190 \
|
||||||
|
--hide-extension "Techmino.app" \
|
||||||
|
--app-drop-link 600 185 \
|
||||||
|
"Techmino-macOS/Techmino-macOS.dmg" \
|
||||||
|
"Techmino-macOS/Techmino.app/"
|
||||||
|
- name: Codesign DMG
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
spctl --assess -vv Techmino-macOS/Techmino.app
|
security unlock-keychain -p ${{ inputs.TEMP_KEYCHAIN_PASSWORD }} \
|
||||||
- name: Ditto zip
|
~/Library/Keychains/${{ inputs.TEMP_KEYCHAIN_USER }}-db
|
||||||
|
|
||||||
|
[[ $(security find-identity) =~ ([0-9A-F]{40}) ]]
|
||||||
|
|
||||||
|
codesign --timestamp --force --strict --deep -v \
|
||||||
|
--options runtime \
|
||||||
|
-s ${BASH_REMATCH[1]} \
|
||||||
|
--entitlements Techmino-macOS/love.entitlements \
|
||||||
|
Techmino-macOS/Techmino-macOS.dmg
|
||||||
|
- name: Fastlane notarize
|
||||||
|
uses: maierj/fastlane-action@v2.0.1
|
||||||
|
with:
|
||||||
|
lane: 'make_safe'
|
||||||
|
subdirectory: 'Techmino-macOS'
|
||||||
|
env:
|
||||||
|
# TODO: Bundle ID
|
||||||
|
APPLE_KEY_ID: '${{ inputs.APPLE_KEY_ID }}'
|
||||||
|
APPLE_ISSUER_ID: '${{ inputs.APPLE_ISSUER_ID }}'
|
||||||
|
APPLE_KEY_CONTENT: '${{ inputs.APPLE_KEY_CONTENT }}'
|
||||||
|
NOTARIZE_OBJECT: 'Techmino-macOS.dmg'
|
||||||
|
BUNDLE_ID: 'org.26f-studio.Techmino.dev'
|
||||||
|
- name: Finalize
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
ditto Techmino-macOS/Techmino.app Archive/
|
mv Techmino-macOS/Techmino-macOS.dmg Techmino.dmg
|
||||||
ditto -c Archive Techmino.zip
|
spctl -a -t open --context context:primary-signature -vv Techmino.dmg
|
||||||
|
|||||||
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@@ -114,7 +114,7 @@ jobs:
|
|||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_macOS
|
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_macOS
|
||||||
path: Techmino.zip
|
path: Techmino.dmg
|
||||||
|
|
||||||
# build-iOS:
|
# build-iOS:
|
||||||
# runs-on: macos-latest
|
# runs-on: macos-latest
|
||||||
|
|||||||
Reference in New Issue
Block a user