Automatic merge branch 'main' into 'devel'

This commit is contained in:
github-actions[bot] 2023-06-08 11:51:02 +00:00 committed by GitHub
commit 72958b9eaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 78 additions and 27 deletions

View File

@ -90,27 +90,7 @@ jobs:
- name: Deploy
shell: bash
run: |
bash scripts/${{ runner.os }}/2_deploy.sh --cert_pssw='${{ secrets.WIN_CERTIFICATE_PSSW }}' --cert_id=${{ secrets.MACOS_CERT_ID }}
- name: Get AppBundle Name
if: runner.os == 'macOS'
id: abn
shell: bash
run: |
cd install
NAME=$(ls -d MeshLab*)
echo "app_bundle_name=$NAME" >> $GITHUB_OUTPUT
- name: Notarize macOS
if: runner.os == 'macOS'
uses: devbotsxyz/xcode-notarize@v1
with:
product-path: "install/${{steps.abn.outputs.app_bundle_name}}"
appstore-connect-username: ${{ secrets.MACOS_NOTARIZATION_USER }}
appstore-connect-password: ${{ secrets.MACOS_NOTARIZATION_PSSW }}
- name: Staple Release macOS
if: runner.os == 'macOS'
uses: devbotsxyz/xcode-staple@v1
with:
product-path: "install/${{steps.abn.outputs.app_bundle_name}}"
bash scripts/${{ runner.os }}/2_deploy.sh --cert_pssw='${{ secrets.WIN_CERTIFICATE_PSSW }}' --cert_id='${{ secrets.MACOS_CERT_ID }}' --notarization_user='${{ secrets.MACOS_NOTARIZATION_USER }}' --notarization_team='${{ secrets.MACOS_NOTARIZATION_TEAM_ID }}' --notarization_pssw='${{ secrets.MACOS_NOTARIZATION_PSSW }}'
- name: Upload MeshLab Portable
uses: actions/upload-artifact@v3
with:
@ -242,7 +222,7 @@ jobs:
cd ..
#Create release and upload
- uses: "marvinpinto/action-automatic-releases@latest"
- uses: "marvinpinto/action-automatic-releases@6273874b61ebc8c71f1a61b2d98e234cf389b303"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "MeshLab-${{steps.envs.outputs.ml_version}}"

View File

@ -6,7 +6,11 @@ INSTALL_PATH=$SCRIPTS_PATH/../../install
QT_DIR_OPTION=""
PACKAGES_PATH=$SCRIPTS_PATH/../../packages
SIGN=false
NOTARIZE=false
CERT_ID=""
NOTAR_USER=""
NOTAR_TEAM_ID=""
NOTAR_PASSWORD=""
#checking for parameters
for i in "$@"
@ -25,12 +29,27 @@ case $i in
shift # past argument=value
;;
-ci=*|--cert_id=*)
if [ -z "${i#*=}" ]; then
SIGN=true
CERT_ID="${i#*=}"
CERT_ID="${i#*=}"
if [ -n "$CERT_ID" ]; then
SIGN=true
fi
shift # past argument=value
;;
-nu=*|--notarization_user=*)
NOTAR_USER="${i#*=}"
if [ -n "$NOTAR_USER" ]; then
NOTARIZE=true
fi
shift # past argument=value
;;
-np=*|--notarization_pssw=*)
NOTAR_PASSWORD="${i#*=}"
shift # past argument=value
;;
-nt=*|--notarization_team=*)
NOTAR_TEAM_ID="${i#*=}"
shift # past argument=value
;;
*)
# unknown option
;;
@ -47,6 +66,12 @@ if [ "$SIGN" = true ] ; then
echo "======= AppBundle Signed ======="
fi
bash $SCRIPTS_PATH/internal/2c_dmg.sh -i=$INSTALL_PATH -p=$PACKAGES_PATH
if [ "$NOTARIZE" = true ] ; then
bash $SCRIPTS_PATH/internal/2c_notarize_appbundle.sh -i=$INSTALL_PATH -nu=$NOTAR_USER -nt=$NOTAR_TEAM_ID -np=$NOTAR_PASSWORD
echo "======= AppBundle Notarized ======="
fi
bash $SCRIPTS_PATH/internal/2d_dmg.sh -i=$INSTALL_PATH -p=$PACKAGES_PATH
echo "======= DMG Created ======="

View File

@ -23,4 +23,6 @@ case $i in
esac
done
codesign --options "runtime" --timestamp --force --deep --sign $CERT_ID $INSTALL_PATH/meshlab.app
codesign --options "runtime" --timestamp --force --deep --sign $CERT_ID $INSTALL_PATH/meshlab.app
spctl -a -vvv $INSTALL_PATH/meshlab.app

View File

@ -0,0 +1,44 @@
#!/bin/bash
SCRIPTS_PATH="$(dirname "$(realpath "$0")")"/..
INSTALL_PATH=$SCRIPTS_PATH/../../install
NOTAR_USER=""
NOTAR_PASSWORD=""
NOTAR_TEAM_ID=""
#checking for parameters
for i in "$@"
do
case $i in
-i=*|--install_path=*)
INSTALL_PATH="${i#*=}"
shift # past argument=value
;;
-nu=*|--notarization_user=*)
NOTAR_USER="${i#*=}"
shift # past argument=value
;;
-nt=*|--notarization_team=*)
NOTAR_TEAM_ID="${i#*=}"
shift # past argument=value
;;
-np=*|--notarization_pssw=*)
NOTAR_PASSWORD="${i#*=}"
shift # past argument=value
;;
*)
# unknown option
;;
esac
done
xcrun notarytool store-credentials "notarytool-profile" --apple-id $NOTAR_USER --team-id $NOTAR_TEAM_ID --password $NOTAR_PASSWORD
ditto -c -k --keepParent "$INSTALL_PATH/meshlab.app" "$INSTALL_PATH/notarization.zip"
xcrun notarytool submit "install/notarization.zip" --keychain-profile "notarytool-profile" --wait
xcrun stapler staple "$INSTALL_PATH/meshlab.app"
rm -rf $INSTALL_PATH/notarization.zip