Skip to content

Commit b060456

Browse files
committed
ci: another go for mac notarization
1 parent 82dbd72 commit b060456

File tree

1 file changed

+13
-27
lines changed

1 file changed

+13
-27
lines changed

.github/actions/agent-package-mac/action.yml

+13-27
Original file line numberDiff line numberDiff line change
@@ -83,47 +83,33 @@ runs:
8383
pkgutil --flatten ./output/klogg_product_pkg ./output/klogg-${{ env.KLOGG_VERSION }}-OSX-flatten.pkg
8484
productsign --sign "${{ env.KLOGG_INSTALLERSIGN }}" --timestamp ./output/klogg-${{ env.KLOGG_VERSION }}-OSX-flatten.pkg ./packages/${{ env.KLOGG_PKG }}
8585
86-
- name: Prepare Notarization Credentials
87-
run: |
88-
# create temporary keychain
89-
KEYCHAIN_PATH=$RUNNER_TEMP/notarization.keychain-db
90-
KEYCHAIN_PASS=$(uuidgen)
91-
security create-keychain -p "${KEYCHAIN_PASS}" ${KEYCHAIN_PATH}
92-
security set-keychain-settings -lut 900 ${KEYCHAIN_PATH}
93-
security unlock-keychain -p "${KEYCHAIN_PASS}" ${KEYCHAIN_PATH}
94-
# import credentials from secrets
95-
xcrun notarytool store-credentials notarization --apple-id "${{ inputs.appstore-connect-username }}" --password "${{ inputs.appstore-connect-password }}" --keychain "${KEYCHAIN_PATH}"
96-
shell: bash
86+
- name: Setup Xcode
87+
shell: sh
88+
run: sudo xcode-select -s /Applications/Xcode_13.2.1.app
9789

9890
- name: Mac notarize DMG
9991
if: ${{ github.event_name != 'pull_request' }}
92+
shell: sh
10093
run: |
101-
KEYCHAIN_PATH=$RUNNER_TEMP/notarization.keychain-db
102-
xcrun notarytool submit "${{ env.KLOGG_BUILD_ROOT }}/packages/${{ env.KLOGG_DMG }}" --keychain-profile "notarize" --keychain "${KEYCHAIN_PATH}" --wait
103-
shell: bash
94+
xcrun notarytool submit --wait --apple-id "${{ inputs.appstore-connect-username }}" --password "${{ inputs.appstore-connect-password }}" "${{ env.KLOGG_BUILD_ROOT }}/packages/${{ env.KLOGG_DMG }}"
10495
10596
- name: Mac staple DMG
10697
if: ${{ github.event_name != 'pull_request' }}
107-
run: xcrun stapler staple "${{ env.KLOGG_BUILD_ROOT }}/packages/${{ env.KLOGG_DMG }}"
108-
shell: bash
98+
shell: sh
99+
run: |
100+
xcrun stapler staple "${{ env.KLOGG_BUILD_ROOT }}/packages/${{ env.KLOGG_DMG }}"
109101
110102
- name: Mac notarize PKG
111103
if: ${{ github.event_name != 'pull_request' }}
104+
shell: sh
112105
run: |
113-
KEYCHAIN_PATH=$RUNNER_TEMP/notarization.keychain-db
114-
xcrun notarytool submit "${{ env.KLOGG_BUILD_ROOT }}/packages/${{ env.KLOGG_PKG }}" --keychain-profile "notarize" --keychain "${KEYCHAIN_PATH}" --wait
115-
shell: bash
106+
xcrun notarytool submit --wait --apple-id "${{ inputs.appstore-connect-username }}" --password "${{ inputs.appstore-connect-password }}" "${{ env.KLOGG_BUILD_ROOT }}/packages/${{ env.KLOGG_PKG }}"
116107
117108
- name: Mac staple PKG
118109
if: ${{ github.event_name != 'pull_request' }}
119-
run: xcrun stapler staple "${{ env.KLOGG_BUILD_ROOT }}/packages/${{ env.KLOGG_PKG }}"
120-
shell: bash
121-
122-
- name: Cleanup Notarization
123-
if: ${{ always() }}
124-
run: security delete-keychain $RUNNER_TEMP/notarization.keychain-db
125-
shell: bash
126-
continue-on-error: true
110+
shell: sh
111+
run: |
112+
xcrun stapler staple "${{ env.KLOGG_BUILD_ROOT }}/packages/${{ env.KLOGG_PKG }}"
127113
128114
- name: Mac symbols
129115
shell: sh

0 commit comments

Comments
 (0)