diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a4c440b1dd..71a2fe5d7c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,6 +38,7 @@ env: rush.json .prettierrc tools + PublishTempFolder: publish_artifacts # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -574,23 +575,25 @@ jobs: security import $CERTIFICATE_PATH -P "$DEV_ID_P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH security list-keychain -d user -s $KEYCHAIN_PATH - - name: Build distribution's - env: - AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} - run: | - cd desktop-package - node ../common/scripts/install-run-rushx.js dist --linux --windows --x64 - name: Build distribution's env: APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_ID_APP_PASS: ${{ secrets.APPLE_ID_APP_PASS }} TEAM_ID: ${{ secrets.TEAM_ID }} - AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} run: | cd desktop-package + node ../common/scripts/install-run-rushx.js dist --linux --windows --x64 node ../common/scripts/install-run-rushx.js dist-signed --macos --x64 --arm64 + ./scripts/copy-publish-artifacts.sh ${{ env.PublishTempFolder}} + - name: Publish distribution assets + uses: ryand56/r2-upload-action@latest + with: + r2-account-id: ${{ secrets.R2_ACCOUNT_ID }} + r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }} + r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }} + r2-bucket: desktop-distro + source-dir: desktop-package/${{ env.PublishTempFolder}} + destination-dir: ./ - name: Publish distribution version env: AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }} diff --git a/desktop-package/package.json b/desktop-package/package.json index d0f006969e..7558351d91 100644 --- a/desktop-package/package.json +++ b/desktop-package/package.json @@ -52,10 +52,8 @@ "entitlementsInherit": "./entitlements.mac.plist", "notarize": false, "publish": { - "provider": "s3", - "bucket": "desktop-distro", - "acl": null, - "endpoint": "https://47fadbaa4ecbea9f3e8b7043a4584e27.r2.cloudflarestorage.com", + "provider": "generic", + "url": "https://dist.huly.io", "channel": "latest" } }, @@ -68,10 +66,8 @@ "verifyUpdateCodeSignature": false, "icon": "./src/AppIcon.png", "publish": { - "provider": "s3", - "bucket": "desktop-distro", - "acl": null, - "endpoint": "https://47fadbaa4ecbea9f3e8b7043a4584e27.r2.cloudflarestorage.com", + "provider": "generic", + "url": "https://dist.huly.io", "channel": "latest" } }, @@ -84,10 +80,8 @@ ], "category": "Utility", "publish": { - "provider": "s3", - "bucket": "desktop-distro", - "acl": null, - "endpoint": "https://47fadbaa4ecbea9f3e8b7043a4584e27.r2.cloudflarestorage.com", + "provider": "generic", + "url": "https://dist.huly.io", "channel": "latest" } } diff --git a/desktop-package/scripts/copy-publish-artifacts.sh b/desktop-package/scripts/copy-publish-artifacts.sh new file mode 100755 index 0000000000..d35f0554c9 --- /dev/null +++ b/desktop-package/scripts/copy-publish-artifacts.sh @@ -0,0 +1,17 @@ +#!/bin/bash +SRC_FOLDER=deploy +TARGET_FOLDER=$1 +CHANNEL=latest + +if [ -d "$TARGET_FOLDER" ]; then rm -Rf $TARGET_FOLDER; fi +mkdir $TARGET_FOLDER + +cp $SRC_FOLDER/*.blockmap $TARGET_FOLDER +cp $SRC_FOLDER/*.dmg $TARGET_FOLDER +cp $SRC_FOLDER/*.zip $TARGET_FOLDER +cp $SRC_FOLDER/*.AppImage $TARGET_FOLDER +cp $SRC_FOLDER/*.deb $TARGET_FOLDER +cp $SRC_FOLDER/*.exe $TARGET_FOLDER +cp $SRC_FOLDER/$CHANNEL.yml $TARGET_FOLDER +cp $SRC_FOLDER/$CHANNEL-mac.yml $TARGET_FOLDER +cp $SRC_FOLDER/$CHANNEL-linux.yml $TARGET_FOLDER