From 8ddb4289d036dfe9fc39a4d347c46188439a6222 Mon Sep 17 00:00:00 2001 From: Kondal Kolipaka Date: Thu, 11 Aug 2022 09:35:33 +0200 Subject: [PATCH] Update ci_release.yml (#582) --- .github/workflows/ci_release.yml | 53 ++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci_release.yml b/.github/workflows/ci_release.yml index be5f79a53..bc25b4f73 100644 --- a/.github/workflows/ci_release.yml +++ b/.github/workflows/ci_release.yml @@ -45,29 +45,53 @@ jobs: /usr/bin/security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign /usr/bin/security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k espressif build.keychain - echo "codesigning espressif-ide" + echo "codesigning espressif-ide-macosx.cocoa.x86_64" /usr/bin/codesign --entitlements $PWD/releng/com.espressif.idf.product/entitlements/espressif-ide.entitlement --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/x86_64/Espressif-IDE.app -v /usr/bin/codesign -v -vvv --deep $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/x86_64/Espressif-IDE.app + + echo "codesigning espressif-ide-macosx.cocoa.aarch64" + /usr/bin/codesign --entitlements $PWD/releng/com.espressif.idf.product/entitlements/espressif-ide.entitlement --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/aarch64/Espressif-IDE.app -v + /usr/bin/codesign -v -vvv --deep $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/aarch64/Espressif-IDE.app - echo "Creating dmg for Espressif-IDE.app" + echo "Creating dmg for espressif-ide-macosx.cocoa.x86_64" $PWD/releng/ide-dmg-builder/ide-dmg-builder.sh - /usr/bin/codesign --entitlements $PWD/releng/com.espressif.idf.product/entitlements/espressif-ide.entitlement --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" $PWD/releng/ide-dmg-builder/Espressif-IDE.dmg -v - /usr/bin/codesign -v -vvv --deep $PWD/releng/ide-dmg-builder/Espressif-IDE.dmg + /usr/bin/codesign --entitlements $PWD/releng/com.espressif.idf.product/entitlements/espressif-ide.entitlement --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-x86_64.dmg -v + /usr/bin/codesign -v -vvv --deep $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-x86_64.dmg + + echo "Creating dmg for espressif-ide-macosx.cocoa.aarch64" + $PWD/releng/ide-dmg-builder/ide-dmg-builder-aarch64.sh + /usr/bin/codesign --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-aarch64.dmg -v + /usr/bin/codesign -v -vvv --deep $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-aarch64.dmg - - name: Notarize Espressif-IDE + - name: Notarize Espressif-IDE-macosx-cocoa-x86_64.dmg env: NOTARIZATION_USERNAME: ${{ secrets.NOTARIZATION_USERNAME }} NOTARIZATION_PASSWORD: ${{ secrets.NOTARIZATION_PASSWORD }} run: | - echo "Notarization of Espressif-IDE.dmg" - xcrun altool --notarize-app -f $PWD/releng/ide-dmg-builder/Espressif-IDE.dmg -u $NOTARIZATION_USERNAME -p $NOTARIZATION_PASSWORD --primary-bundle-id Espressif-ide.app - - - name: Upload macosx dmg + echo "Notarization of Espressif-IDE-macosx-cocoa-x86_64.dmg" + xcrun altool --notarize-app -f $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-x86_64.dmg -u $NOTARIZATION_USERNAME -p $NOTARIZATION_PASSWORD --primary-bundle-id Espressif-ide.app + + - name: Notarize Espressif-IDE-macosx-cocoa-aarch64.dmg + env: + NOTARIZATION_USERNAME: ${{ secrets.NOTARIZATION_USERNAME }} + NOTARIZATION_PASSWORD: ${{ secrets.NOTARIZATION_PASSWORD }} + run: | + echo "Notarization of Espressif-IDE-macosx-cocoa-aarch64.dmg" + xcrun altool --notarize-app -f $PWD/releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-aarch64.dmg -u $NOTARIZATION_USERNAME -p $NOTARIZATION_PASSWORD --primary-bundle-id Espressif-ide.app + + - name: Upload Espressif-IDE-macosx-cocoa-x86_64.dmg + if: ${{ !cancelled() }} + uses: actions/upload-artifact@v2 + with: + name: espressif-ide-macosx-cocoa-x86_64 + path: releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-x86_64.dmg + + - name: Upload Espressif-IDE-macosx-cocoa-aarch64.dmg if: ${{ !cancelled() }} uses: actions/upload-artifact@v2 with: - name: espressif-ide-macosx-dmg - path: releng/ide-dmg-builder/Espressif-IDE.dmg + name: espressif-ide-macosx.cocoa.aarch64 + path: releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-aarch64.dmg - name: Upload build artifacts if: ${{ !cancelled() }} @@ -90,6 +114,7 @@ jobs: name: espressif-ide-linux path: releng/com.espressif.idf.product/target/products/Espressif-IDE-*-linux.gtk.x86_64.tar.gz + - name: Upload build assets to dl.espressif.com id: upload-release-asset-espressif env: @@ -114,12 +139,14 @@ jobs: ARCHIVE_VERSION_NEW="${ARCHIVE_PREFIX}${ARCHIVE_VERSION}.zip" echo ${ARCHIVE_VERSION_NEW} mv ${ARCHIVE_FILE_NAME} ${ARCHIVE_VERSION_NEW} - mv releng/ide-dmg-builder/Espressif-IDE.dmg "releng/ide-dmg-builder/Espressif-IDE-${FOLDER_NAME}.dmg" + mv releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-x86_64.dmg "releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-x86_64-${FOLDER_NAME}.dmg" + mv releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-aarch64.dmg "releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-aarch64-${FOLDER_NAME}.dmg" aws s3 rm s3://${{ secrets.DL_BUCKET }}/dl/idf-eclipse-plugin/updates/latest --recursive aws s3 cp --acl=public-read --recursive "./${FOLDER_NAME}/" s3://${{ secrets.DL_BUCKET }}/dl/idf-eclipse-plugin/updates/latest aws s3 cp --acl=public-read "./releng/index.html" s3://${{ secrets.DL_BUCKET }}/dl/idf-eclipse-plugin/updates/latest/ aws s3 cp --acl=public-read --recursive "./${FOLDER_NAME}/" s3://${{ secrets.DL_BUCKET }}/dl/idf-eclipse-plugin/updates/${FOLDER_NAME} aws s3 cp --acl=public-read --recursive --exclude "*" --include "Espressif-IDE-*" ./releng/com.espressif.idf.product/target/products/ s3://${{ secrets.DL_BUCKET }}/dl/idf-eclipse-plugin/ide/ aws s3 cp --acl=public-read "${ARCHIVE_VERSION_NEW}" s3://${{ secrets.DL_BUCKET }}/dl/idf-eclipse-plugin/updates/ - aws s3 cp --acl=public-read "./releng/ide-dmg-builder/Espressif-IDE-${FOLDER_NAME}.dmg" s3://${{ secrets.DL_BUCKET }}/dl/idf-eclipse-plugin/ide/ + aws s3 cp --acl=public-read "./releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-x86_64-${FOLDER_NAME}.dmg" s3://${{ secrets.DL_BUCKET }}/dl/idf-eclipse-plugin/ide/ + aws s3 cp --acl=public-read "./releng/ide-dmg-builder/Espressif-IDE-macosx-cocoa-aarch64-${FOLDER_NAME}.dmg" s3://${{ secrets.DL_BUCKET }}/dl/idf-eclipse-plugin/ide/ aws cloudfront create-invalidation --distribution-id ${{ secrets.DL_DISTRIBUTION_ID }} --paths "/dl/idf-eclipse-plugin/updates/latest/*"