Skip to content

Commit

Permalink
uberf-7856: fix desktop publishing CI (#6308)
Browse files Browse the repository at this point in the history
  • Loading branch information
lexiv0re authored Aug 9, 2024
1 parent d29f44e commit db6cb9f
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 21 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 }}
Expand Down
18 changes: 6 additions & 12 deletions desktop-package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
},
Expand All @@ -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"
}
},
Expand All @@ -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"
}
}
Expand Down
17 changes: 17 additions & 0 deletions desktop-package/scripts/copy-publish-artifacts.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit db6cb9f

Please sign in to comment.