Skip to content

Commit

Permalink
Rename script
Browse files Browse the repository at this point in the history
  • Loading branch information
FigBug committed Feb 23, 2023
1 parent 96aa365 commit be86b69
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build_macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: "Run script"
run: ./ci/mac/build
run: ./ci/mac/build.sh
shell: bash
env:
APPLICATION: ${{ secrets.APPLICATION }}
INSTALLER: ${{ secrets.INSTALLER }}
APPLE_PASS: ${{ secrets.APPLE_PASS }}
APPLE_USER: ${{ secrets.APPLE_USER }}
APIKEY: ${{ secrets.APIKEY }}
- uses: actions/upload-artifact@v1
with:
name: Mac
Expand Down
40 changes: 40 additions & 0 deletions ci/mac/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/sh -e
set -x

if [[ -n "$APPLICATION" ]]; then
echo "Create a keychain"
security create-keychain -p nr4aGPyz Keys.keychain

echo $APPLICATION | base64 -D -o /tmp/Application.p12
echo $INSTALLER | base64 -D -o /tmp/Installer.p12

security import /tmp/Application.p12 -t agg -k Keys.keychain -P aym9PKWB -A -T /usr/bin/codesign
security import /tmp/Installer.p12 -t agg -k Keys.keychain -P aym9PKWB -A -T /usr/bin/codesign

security list-keychains -s Keys.keychain
security default-keychain -s Keys.keychain
security unlock-keychain -p nr4aGPyz Keys.keychain
security set-keychain-settings -l -u -t 13600 Keys.keychain
security set-key-partition-list -S apple-tool:,apple: -s -k nr4aGPyz Keys.keychain
fi

DEV_APP_ID="Developer ID Application: Roland Rabien (3FS7DJDG38)"
DEV_INST_ID="Developer ID Installer: Roland Rabien (3FS7DJDG38)"

ROOT=$(cd "$(dirname "$0")/../.."; pwd)
cd "$ROOT"

cd "$ROOT"
xcodebuild -configuration Release || exit 1

rm -Rf "$ROOT/ci/mac/bin"
mkdir -p "$ROOT/ci/mac/bin"
cp -R "$ROOT/build/Release/imguru" "$ROOT/ci/mac/bin"

cd "$ROOT/ci/mac/bin"
codesign --force -s "$DEV_APP_ID" -v "imguru" --deep --strict --options=runtime

zip -r imguru.zip imguru
rm imguru

xcrun notarytool submit --verbose --apple-id "$APPLE_USER" --password "$APPLE_PASS" --team-id 3FS7DJDG38 --wait --timeout 30m "./imguru.zip"

0 comments on commit be86b69

Please sign in to comment.