Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nheko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
nheko
Commits
eaa39ac2
Commit
eaa39ac2
authored
3 years ago
by
Joe Donofry
Browse files
Options
Downloads
Plain Diff
Merge branch 'macos_notarization' into 'master'
Macos notarization See merge request
!11
parents
764bd203
3b643c9c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!11
Macos notarization
Pipeline
#1734
passed
3 years ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.ci/macos/notarize.sh
+73
-0
73 additions, 0 deletions
.ci/macos/notarize.sh
.gitlab-ci.yml
+26
-6
26 additions, 6 deletions
.gitlab-ci.yml
with
99 additions
and
6 deletions
.ci/macos/notarize.sh
0 → 100755
+
73
−
0
View file @
eaa39ac2
#!/bin/sh
set
-u
# Modified version of script found at:
# https://forum.qt.io/topic/96652/how-to-notarize-qt-application-on-macos/18
# Add Qt binaries to path
PATH
=
"/usr/local/opt/qt@5/bin/:
${
PATH
}
"
security unlock-keychain
-p
"
${
RUNNER_USER_PW
}
"
login.keychain
(
cd
build
||
exit
# macdeployqt does not copy symlinks over.
# this specifically addresses icu4c issues but nothing else.
# We might not even need this any longer...
# ICU_LIB="$(brew --prefix icu4c)/lib"
# export ICU_LIB
# mkdir -p nheko.app/Contents/Frameworks
# find "${ICU_LIB}" -type l -name "*.dylib" -exec cp -a -n {} nheko.app/Contents/Frameworks/ \; || true
macdeployqt nheko.app
-dmg
-always-overwrite
-qmldir
=
../resources/qml/
-sign-for-notarization
=
"
${
APPLE_DEV_IDENTITY
}
"
user
=
$(
id
-nu
)
chown
"
${
user
}
"
nheko.dmg
)
NOTARIZE_SUBMIT_LOG
=
$(
mktemp
-t
notarize-submit
)
NOTARIZE_STATUS_LOG
=
$(
mktemp
-t
notarize-status
)
finish
()
{
rm
"
$NOTARIZE_SUBMIT_LOG
"
"
$NOTARIZE_STATUS_LOG
"
}
trap
finish EXIT
dmgbuild
-s
.ci/macos/settings.json
"Nheko"
nheko.dmg
codesign
-s
"
${
APPLE_DEV_IDENTITY
}
"
nheko.dmg
user
=
$(
id
-nu
)
chown
"
${
user
}
"
nheko.dmg
echo
"--> Start Notarization process"
xcrun altool
-t
osx
-f
nheko.dmg
--primary-bundle-id
"io.github.nheko-reborn.nheko"
--notarize-app
-u
"
${
APPLE_DEV_USER
}
"
-p
"
${
APPLE_DEV_PASS
}
"
>
"
$NOTARIZE_SUBMIT_LOG
"
2>&1
requestUUID
=
"
$(
awk
-F
' = '
'/RequestUUID/ {print $2}'
"
$NOTARIZE_SUBMIT_LOG
"
)
"
while
sleep
60
&&
date
;
do
echo
"--> Checking notarization status for
${
requestUUID
}
"
xcrun altool
--notarization-info
"
${
requestUUID
}
"
-u
"
${
APPLE_DEV_USER
}
"
-p
"
${
APPLE_DEV_PASS
}
"
>
"
$NOTARIZE_STATUS_LOG
"
2>&1
isSuccess
=
$(
grep
"success"
"
$NOTARIZE_STATUS_LOG
"
)
isFailure
=
$(
grep
"invalid"
"
$NOTARIZE_STATUS_LOG
"
)
if
[
-n
"
${
isSuccess
}
"
]
;
then
echo
"Notarization done!"
xcrun stapler staple
-v
nheko.dmg
echo
"Stapler done!"
break
fi
if
[
-n
"
${
isFailure
}
"
]
;
then
echo
"Notarization failed"
cat
"
$NOTARIZE_STATUS_LOG
"
1>&2
return
1
fi
echo
"Notarization not finished yet, sleep 1m then check again..."
done
VERSION
=
${
CI_COMMIT_SHORT_SHA
}
if
[
-n
"
$VERSION
"
]
;
then
mv
nheko.dmg
"nheko-
${
VERSION
}
.dmg"
mkdir
artifacts
cp
"nheko-
${
VERSION
}
.dmg"
artifacts/
fi
\ No newline at end of file
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
26
−
6
View file @
eaa39ac2
...
@@ -55,7 +55,6 @@ build-macos:
...
@@ -55,7 +55,6 @@ build-macos:
#- brew update
#- brew update
#- brew reinstall --force python3
#- brew reinstall --force python3
#- brew bundle --file=./.ci/macos/Brewfile --force --cleanup
#- brew bundle --file=./.ci/macos/Brewfile --force --cleanup
-
pip3 install dmgbuild
-
rm -rf ../.hunter && mv .hunter ../.hunter ||
true
-
rm -rf ../.hunter && mv .hunter ../.hunter ||
true
script
:
script
:
-
export PATH=/usr/local/opt/qt@5/bin/:${PATH}
-
export PATH=/usr/local/opt/qt@5/bin/:${PATH}
...
@@ -72,19 +71,40 @@ build-macos:
...
@@ -72,19 +71,40 @@ build-macos:
-
cmake --build build
-
cmake --build build
after_script
:
after_script
:
-
mv ../.hunter .hunter
-
mv ../.hunter .hunter
-
./.ci/macos/deploy.sh
-
./.ci/upload-nightly-gitlab.sh artifacts/nheko-${CI_COMMIT_SHORT_SHA}.dmg
artifacts
:
artifacts
:
paths
:
paths
:
-
artifacts/nheko-${CI_COMMIT_SHORT_SHA}.dmg
-
build/nheko.app
name
:
nheko-${CI_COMMIT_SHORT_SHA}-macos
name
:
nheko-${CI_COMMIT_SHORT_SHA}-macos-app
expose_as
:
'
macos-dmg'
expose_as
:
'
macos-app'
public
:
false
cache
:
cache
:
key
:
"
${CI_JOB_NAME}"
key
:
"
${CI_JOB_NAME}"
paths
:
paths
:
-
.hunter/
-
.hunter/
-
"
${CCACHE_DIR}"
-
"
${CCACHE_DIR}"
codesign-macos
:
stage
:
deploy
tags
:
[
macos
]
before_script
:
-
pip3 install dmgbuild
script
:
-
export PATH=/usr/local/opt/qt@5/bin/:${PATH}
-
./.ci/macos/notarize.sh
after_script
:
-
./.ci/upload-nightly-gitlab.sh artifacts/nheko-${CI_COMMIT_SHORT_SHA}.dmg
needs
:
-
build-macos
rules
:
-
if
:
'
$CI_COMMIT_BRANCH
==
"master"'
-
if
:
$CI_COMMIT_TAG
artifacts
:
paths
:
-
artifacts/nheko-${CI_COMMIT_SHORT_SHA}.dmg
name
:
nheko-${CI_COMMIT_SHORT_SHA}-macos
expose_as
:
'
macos-dmg'
build-flatpak-amd64
:
build-flatpak-amd64
:
stage
:
build
stage
:
build
image
:
ubuntu:latest
image
:
ubuntu:latest
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment