Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Electron 31.6.0 #2948

Merged
merged 11 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 67 additions & 35 deletions .github/workflows/pull-request-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ jobs:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}

- name: Build Windows Package
if: ${{ matrix.os == 'windows-latest'}}
if: ${{ matrix.os == 'windows-latest' }}
run: yarn electron-builder --publish never --x64 --win nsis
env:
CSC_LINK: ${{ secrets.WIN_CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }}

- name: Build MacOS Package
if: ${{ matrix.os == 'macos-latest'}}
if: ${{ matrix.os == 'macos-latest' }}
run: |
sudo mdutil -a -i off
yarn electron-builder --publish never --mac --universal
Expand All @@ -79,49 +79,81 @@ jobs:
ASC_PROVIDER: 'S6UPZG7ZR3'

- name: Build Ubuntu Package
if: ${{ matrix.os == 'ubuntu-latest'}}
if: ${{ matrix.os == 'ubuntu-latest' }}
run: yarn electron-builder --publish never --linux snap

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }} Artifacts
path: |
dist/rocketchat-*.dmg
dist/rocketchat-*.pkg
dist/rocketchat-*.exe
dist/rocketchat-*.snap

- name: Get Artifact URL
id: get-artifact-url
# Install AWS CLI
- name: Install AWS CLI
run: pip install awscli

# Upload artifacts to Wasabi (Windows)
- name: Upload Artifacts to Wasabi (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: |
aws s3 cp dist/ s3://${{ secrets.WASABI_BUCKET_NAME }}/pr-${{ github.event.pull_request.number }}/${{ matrix.os }}/ --recursive `
--acl public-read `
--endpoint-url=https://s3.us-east-1.wasabisys.com `
--exclude "*" `
--include "rocketchat-*.exe"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.WASABI_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.WASABI_SECRET_ACCESS_KEY }}

# Upload artifacts to Wasabi (macOS)
- name: Upload Artifacts to Wasabi (macOS)
if: ${{ matrix.os == 'macos-latest' }}
run: |
aws s3 cp dist/ s3://${{ secrets.WASABI_BUCKET_NAME }}/pr-${{ github.event.pull_request.number }}/${{ matrix.os }}/ --recursive \
--acl public-read \
--endpoint-url=https://s3.us-east-1.wasabisys.com \
--exclude "*" \
--include "rocketchat-*.dmg" \
--include "rocketchat-*.pkg"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.WASABI_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.WASABI_SECRET_ACCESS_KEY }}

# Upload artifacts to Wasabi (Ubuntu)
- name: Upload Artifacts to Wasabi (Ubuntu)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
aws s3 cp dist/ s3://${{ secrets.WASABI_BUCKET_NAME }}/pr-${{ github.event.pull_request.number }}/${{ matrix.os }}/ --recursive \
--acl public-read \
--endpoint-url=https://s3.us-east-1.wasabisys.com \
--exclude "*" \
--include "rocketchat-*.snap"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.WASABI_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.WASABI_SECRET_ACCESS_KEY }}

# Get Artifact URLs using actions/github-script (only specified file extensions)
- name: Get Artifact URLs
id: get-artifact-urls
uses: actions/github-script@v6
with:
script: |
const owner = context.repo.owner;
const repo = context.repo.repo;
const runId = context.runId;

const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner,
repo,
run_id: runId
});

const artifact = artifacts.data.artifacts.find(a => a.name === '${{ runner.os }} Artifacts');
if (artifact) {
const url = `https://github.com/${owner}/${repo}/actions/runs/${runId}/artifacts/${artifact.id}`;
core.setOutput('artifact_url', url);
} else {
core.setFailed(`Artifact not found for ${artifact.name}`);
const fs = require('fs');
const path = require('path');
const distDir = path.join(process.cwd(), 'dist');
const files = fs.readdirSync(distDir);
const patterns = [/rocketchat-.*\.dmg$/, /rocketchat-.*\.pkg$/, /rocketchat-.*\.exe$/, /rocketchat-.*\.snap$/];
let artifactUrls = '';
for (const file of files) {
if (patterns.some(pattern => pattern.test(file))) {
const artifactUrl = `https://s3.us-east-1.wasabisys.com/${{ secrets.WASABI_BUCKET_NAME }}/pr-${{ github.event.pull_request.number }}/${{ matrix.os }}/${file}`;
artifactUrls += `- [${file}](${artifactUrl})\n`;
}
}
core.setOutput('artifact_urls', artifactUrls.trim());

- name: Post PR Comment with the Artifact link
if: steps.get-artifact-url.outputs.artifact_url != ''
- name: Post PR Comment with the Artifact links
if: steps.get-artifact-urls.outputs.artifact_urls != ''
uses: marocchino/sticky-pull-request-comment@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
message: |
### [${{ runner.os }} installer download](${{ steps.get-artifact-url.outputs.artifact_url }})
header: '### Artifact for ${{ runner.os }}'
### ${{ runner.os }} installer download
${{ steps.get-artifact-urls.outputs.artifact_urls }}
header: '### ${{ runner.os }} installer download'
recreate: true
append: false
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"productName": "Rocket.Chat",
"name": "rocketchat",
"description": "Official OSX, Windows, and Linux Desktop Clients for Rocket.Chat",
"version": "4.1.0",
"version": "4.1.1",
"author": "Rocket.Chat Support <[email protected]>",
"copyright": "© 2016-2024, Rocket.Chat",
"homepage": "https://rocket.chat",
Expand Down Expand Up @@ -109,7 +109,7 @@
"chokidar": "~3.5.3",
"conventional-changelog-cli": "~4.1.0",
"convert-svg-to-png": "~0.6.4",
"electron": "30.4.0",
"electron": "31.6.0",
"electron-builder": "24.13.3",
"electron-devtools-installer": "^3.2.0",
"electron-notarize": "^1.2.2",
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9008,16 +9008,16 @@ __metadata:
languageName: node
linkType: hard

"electron@npm:30.4.0":
version: 30.4.0
resolution: "electron@npm:30.4.0"
"electron@npm:31.6.0":
version: 31.6.0
resolution: "electron@npm:31.6.0"
dependencies:
"@electron/get": "npm:^2.0.0"
"@types/node": "npm:^20.9.0"
extract-zip: "npm:^2.0.1"
bin:
electron: cli.js
checksum: a79a43e7b074b1cc028140fadebe7fb10d27d388bc20210086533738b19a763e85cc91ffb5584e85e3ef3caa35f7293dd12363aebff2d8a28a0eac24998f4908
checksum: ef304dd279a6f01143de000d3be420bde8f6feb5b72387c2b22e64fd97e1d5b80a0e82e4f2dee660b36a8a682e4f9cbcd2e6d2f73f5e7ba4e84d8bfb03c1d8e2
languageName: node
linkType: hard

Expand Down Expand Up @@ -15544,7 +15544,7 @@ __metadata:
chokidar: "npm:~3.5.3"
conventional-changelog-cli: "npm:~4.1.0"
convert-svg-to-png: "npm:~0.6.4"
electron: "npm:30.4.0"
electron: "npm:31.6.0"
electron-builder: "npm:24.13.3"
electron-devtools-installer: "npm:^3.2.0"
electron-dl: "npm:3.5.2"
Expand Down
Loading