Skip to content

Commit 4d70702

Browse files
authored
Merge pull request #1411 from session-foundation/release/1.16.0
Session 1.16.0
2 parents 073ab14 + 34119dc commit 4d70702

File tree

320 files changed

+5112
-6954
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

320 files changed

+5112
-6954
lines changed

.github/workflows/build-binaries.yml

Lines changed: 135 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ concurrency:
2222
cancel-in-progress: true
2323

2424
env:
25-
# we want to publish on "push to master" only. When we don't want to publish, we want to upload artefacts
25+
# we only want to publish on "push to master" or alpha releases. When we don't want to publish, we want to upload artefacts
2626
SHOULD_PUBLISH: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
27+
SHOULD_PUBLISH_ALPHA: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release') && contains(github.ref, '-alpha.') }}
2728

2829
jobs:
2930
build_linux:
@@ -49,7 +50,7 @@ jobs:
4950

5051
- name: Lint Files
5152
# no need to lint files on all platforms
52-
run: yarn lint-full
53+
run: yarn lint
5354

5455
- name: Enforce yarn.lock has no duplicates
5556
uses: ./actions/deduplicate_fail
@@ -58,43 +59,42 @@ jobs:
5859
- name: Unit Test
5960
run: yarn test
6061

61-
- name: Build but do not publish ${{ matrix.pkg_to_build }}
62-
# we want this to run always, except on "push" to "master"
63-
if: ${{ env.SHOULD_PUBLISH == 'false' }}
62+
- name: Make release build but do not publish ${{ matrix.pkg_to_build }}
63+
# always run this, except on "push" to "master" or alpha releases
64+
if: ${{ env.SHOULD_PUBLISH == 'false' && env.SHOULD_PUBLISH_ALPHA == 'false' }}
6465
run: |
6566
sed -i 's/"target": "deb"/"target": "${{ matrix.pkg_to_build }}"/g' package.json && yarn build-release
6667
6768
- name: Upload artefacts ${{ matrix.pkg_to_build }}
68-
# we want this to run always, except on "push" to "master"
69-
if: ${{ env.SHOULD_PUBLISH == 'false' }}
69+
# always run this, except on "push" to "master" or alpha releases
70+
if: ${{ env.SHOULD_PUBLISH == 'false' && env.SHOULD_PUBLISH_ALPHA == 'false' }}
7071
uses: ./actions/upload_prod_artefacts
7172
with:
7273
upload_prefix: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.pkg_to_build }}
7374

74-
- name: Build & publish ${{ matrix.pkg_to_build }}
75-
# we want this to run only when on "push" to "master"
76-
if: ${{ env.SHOULD_PUBLISH == 'true' }}
75+
- name: Make release build & publish ${{ matrix.pkg_to_build }}
76+
# only run this on "push" to "master" or alpha releases
77+
if: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
7778
run: |
7879
sed -i 's/"target": "deb"/"target": "${{ matrix.pkg_to_build }}"/g' package.json && yarn build-release-publish
7980
80-
- name: Backup AppImage latest-linux.yml file
81-
# only run this on "push" to "master"
82-
# Note: only AppImage can auto update via electron-builder on linux.continue-on-error.
83-
# Note: We need to backup the latest-linux appImage file as other builds are overwriting it when they finish
84-
# after the AppImage build
85-
if: ${{ env.SHOULD_PUBLISH == 'true' && matrix.pkg_to_build == 'AppImage' }}
81+
- name: Backup release metadata
82+
# only run this on "push" to "master" or alpha releases
83+
# Note: The jobs are overwriting each other's latest-linux.yml.
84+
# So, we upload all of them as artifacts, and then merge them (see `post_build_linux`)
85+
# note: freebsd does not generate a latest-linux.yml file so we exclude it
86+
if: ${{ (env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true') && matrix.pkg_to_build != 'freebsd' }}
8687
shell: bash
8788
run: |
88-
mv dist/latest-linux.yml dist/latest-linux-${{ matrix.pkg_to_build }}.yml
89+
mv dist/latest-linux.yml dist/latest-linux-${{ matrix.pkg_to_build }}-${{ github.sha }}.yml
8990
9091
- name: Upload release metadata
91-
# only run this on "push" to "master"
92-
# Check the details of why we need this above (and why only for AppImage)
93-
if: ${{ env.SHOULD_PUBLISH == 'true' && matrix.pkg_to_build == 'AppImage' }}
92+
# only run this on "push" to "master" or alpha releases
93+
if: ${{ (env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true') && matrix.pkg_to_build != 'freebsd' }}
9494
uses: actions/upload-artifact@v4
9595
with:
96-
name: latest-linux-${{ matrix.pkg_to_build }}.yml
97-
path: dist/latest-linux-${{ matrix.pkg_to_build }}.yml
96+
name: latest-linux-${{ matrix.pkg_to_build }}-${{ github.sha }}.yml
97+
path: dist/latest-linux-${{ matrix.pkg_to_build }}-${{ github.sha }}.yml
9898

9999
post_build_linux:
100100
needs: [build_linux]
@@ -103,45 +103,50 @@ jobs:
103103
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
104104
steps:
105105
- name: Checkout git repo
106-
# only run this on "push" to "master"
107-
if: ${{ env.SHOULD_PUBLISH == 'true' }}
106+
# only run this on "push" to "master" or alpha releases
107+
if: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
108108
uses: actions/checkout@v4
109-
# We only need the package.json file in this run (to extract the version being built)
109+
# We only need a few files in this run, no point cloning everything
110110
with:
111111
sparse-checkout: |
112112
package.json
113+
build/setup-release-combine.sh
114+
build/release-notes.md
115+
build/release-notes-alpha.md
113116
sparse-checkout-cone-mode: false
114117

115118
- name: Get version tag from package.json
116119
id: get_version
117-
# only run this on "push" to "master"
118-
if: ${{ env.SHOULD_PUBLISH == 'true' }}
120+
# only run this on "push" to "master" or alpha releases
121+
if: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
119122
run: |
120123
version=$(node -p "require('./package.json').version")
121124
echo "VERSION_TAG=$version" >> "$GITHUB_OUTPUT"
122125
123126
- name: Download release metadata
124-
# only run this on "push" to "master"
125-
if: ${{ env.SHOULD_PUBLISH == 'true' }}
127+
# only run this on "push" to "master" or alpha releases
128+
if: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
126129
uses: actions/download-artifact@v4
127130
with:
128-
name: latest-linux-AppImage.yml
131+
pattern: latest-linux-*-${{ github.sha }}.yml
129132
path: dist
133+
merge-multiple: true
130134

131-
- name: Rename
132-
# only run this on "push" to "master"
133-
if: ${{ env.SHOULD_PUBLISH == 'true' }}
135+
- name: Combine release metadata
136+
# only run this on "push" to "master" or alpha releases
137+
if: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
134138
run: |
135-
mv dist/latest-linux-AppImage.yml dist/latest-linux.yml
139+
./build/setup-release-combine.sh ${{ github.sha }} linux
136140
137141
- name: Upload changes to draft release
138-
# only run this on "push" to "master"
139-
if: ${{ env.SHOULD_PUBLISH == 'true' }}
142+
# only run this on "push" to "master" or alpha releases
143+
if: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
140144
uses: ncipollo/release-action@v1
141145
with:
142146
tag: v${{ steps.get_version.outputs.VERSION_TAG }}
143147
draft: true
144148
name: 'Draft'
149+
bodyFile: ${{ env.SHOULD_PUBLISH_ALPHA == 'true' && 'build/release-notes-alpha.md' || 'build/release-notes.md' }}
145150
artifacts: 'dist/latest-linux.yml'
146151
allowUpdates: true
147152
omitNameDuringUpdate: true
@@ -167,26 +172,56 @@ jobs:
167172
- name: Unit Test
168173
run: yarn test
169174

170-
- name: Build but do not publish
171-
# we want this to run always, except on "push" to "master"
172-
if: ${{ env.SHOULD_PUBLISH == 'false' }}
175+
- name: Make release build but do not publish
176+
# always run this, except on "push" to "master" or alpha releases
177+
if: ${{ env.SHOULD_PUBLISH == 'false' && env.SHOULD_PUBLISH_ALPHA == 'false' }}
173178
run: yarn build-release
174179

175180
- name: Upload artefacts
176-
# we want this to run always, except on "push" to "master"
177-
if: ${{ env.SHOULD_PUBLISH == 'false' }}
181+
# always run this, except on "push" to "master" or alpha releases
182+
if: ${{ env.SHOULD_PUBLISH == 'false' && env.SHOULD_PUBLISH_ALPHA == 'false' }}
178183
uses: ./actions/upload_prod_artefacts
179184
with:
180185
upload_prefix: ${{ runner.os }}-${{ runner.arch }}
181186

182-
- name: Build & publish
183-
# we want this to run only when on "push" to "master"
184-
if: ${{ env.SHOULD_PUBLISH == 'true' }}
187+
- name: Make release build & publish
188+
# only run this on "push" to "master" or alpha releases
189+
if: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
185190
run: yarn build-release-publish # No other args needed for windows publish
186191

187-
# We want a mac arm64 build, and according to this https://github.com/actions/runner-images#available-images macos-14 is always arm64
188-
# macos-14 is disabled for now as we hit our free tier limit for macos builds
189-
build_macos_x64:
192+
# We want both arm64 and intel mac builds, and according to this https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources macos-14 and above is always arm64 and macos-13 is the last intel runner
193+
# NOTE x64 builds made on an arm64 host will not bundle the native modules correctly https://github.com/electron-userland/electron-builder/issues/8646
194+
build_mac_arm64:
195+
runs-on: macos-14
196+
env:
197+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
198+
MAC_CERTIFICATE: ${{ secrets.MAC_CERTIFICATE }}
199+
MAC_CERTIFICATE_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }}
200+
SIGNING_APPLE_ID: ${{ secrets.SIGNING_APPLE_ID }}
201+
SIGNING_APP_PASSWORD: ${{ secrets.SIGNING_APP_PASSWORD }}
202+
SIGNING_TEAM_ID: ${{ secrets.SIGNING_TEAM_ID }}
203+
steps:
204+
- run: git config --global core.autocrlf false
205+
206+
- name: Checkout git repo
207+
uses: actions/checkout@v4
208+
209+
- name: Setup & Build
210+
uses: ./actions/setup_and_build
211+
with:
212+
cache_suffix: mac-arm64
213+
214+
# we want to test on all platforms since some are testing the rendered menus (and are dependent on the platform)
215+
- name: Unit Test
216+
run: yarn test
217+
218+
- name: Make release build arm64
219+
uses: ./actions/make_release_build
220+
with:
221+
architecture: arm64
222+
should_publish: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
223+
224+
build_mac_x64:
190225
runs-on: macos-13
191226
env:
192227
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -204,29 +239,66 @@ jobs:
204239
- name: Setup & Build
205240
uses: ./actions/setup_and_build
206241
with:
207-
cache_suffix: 'macos_x64'
242+
cache_suffix: mac-x64
208243

209244
# we want to test on all platforms since some are testing the rendered menus (and are dependent on the platform)
210245
- name: Unit Test
211246
run: yarn test
212247

213-
- name: Build but do not publish
214-
# we want this to run always, except on "push" to "master"
215-
if: ${{ env.SHOULD_PUBLISH == 'false' }}
248+
- name: Make release build x64
249+
uses: ./actions/make_release_build
250+
with:
251+
architecture: x64
252+
should_publish: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
253+
254+
post_build_mac:
255+
needs: [build_mac_arm64, build_mac_x64]
256+
runs-on: ubuntu-22.04
257+
steps:
258+
- name: Checkout git repo
259+
# only run this on "push" to "master" or alpha releases
260+
if: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
261+
uses: actions/checkout@v4
262+
# We only need the package.json file in this run (to extract the version being built)
263+
with:
264+
sparse-checkout: |
265+
package.json
266+
build/setup-release-combine.sh
267+
268+
- name: Get version tag from package.json
269+
id: get_version
270+
# only run this on "push" to "master" or alpha releases
271+
if: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
216272
run: |
217-
source ./build/setup-mac-certificate.sh
218-
yarn build-release --config.mac.bundleVersion=${{ github.ref }}
273+
version=$(node -p "require('./package.json').version")
274+
echo "VERSION_TAG=$version" >> "$GITHUB_OUTPUT"
219275
220-
- name: Upload artefacts
221-
# we want this to run always, except on "push" to "master"
222-
if: ${{ env.SHOULD_PUBLISH == 'false' }}
223-
uses: ./actions/upload_prod_artefacts
276+
- name: Download release metadata
277+
# only run this on "push" to "master" or alpha releases
278+
if: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
279+
uses: actions/download-artifact@v4
224280
with:
225-
upload_prefix: ${{ runner.os }}-${{ runner.arch }}
281+
pattern: latest-mac-*-${{ github.sha }}.yml
282+
path: dist
283+
merge-multiple: true
226284

227-
- name: Build & publish
228-
# we want this to run only when on "push" to "master"
229-
if: ${{ env.SHOULD_PUBLISH == 'true' }}
285+
- name: Combine release metadata
286+
# only run this on "push" to "master" or alpha releases
287+
if: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
230288
run: |
231-
source ./build/setup-mac-certificate.sh
232-
yarn build-release-publish --config.mac.bundleVersion=${{ github.ref }}
289+
./build/setup-release-combine.sh ${{ github.sha }} mac
290+
291+
- name: Upload changes to draft release
292+
# only run this on "push" to "master" or alpha releases
293+
if: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
294+
uses: ncipollo/release-action@v1
295+
with:
296+
tag: v${{ steps.get_version.outputs.VERSION_TAG }}
297+
draft: true
298+
name: 'Draft'
299+
artifacts: 'dist/latest-mac.yml'
300+
allowUpdates: true
301+
omitBodyDuringUpdate: true
302+
omitNameDuringUpdate: true
303+
replacesArtifacts: true
304+
updateOnlyUnreleased: true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ yarn-error.log
3737
# editor
3838
.vscode/
3939
.vscrof/
40+
.idea/
4041

4142

4243
playwright.config.js

CONTRIBUTING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,20 @@ We use the `python3` command for many of our scripts. If you have installed Pyth
284284

285285
</details>
286286

287+
<details>
288+
<summary><em>...(mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))...</em></summary>
289+
290+
> **TLDR**
291+
> If you are using VS Code, check the architecture of your integrated terminal by running `uname -m` in it.
292+
> This also applies to NodeJS installations. Check with `node -p process.arch`.
293+
> If the architecture doesn't match your host operating system Session will fail to run.
294+
295+
Are you using Visual Studio Code? Make sure that your installation matches your host operating system. For example if your device is `arm64` make sure the VS Code installation is not `x86_64`. If they do not match and you are using VS Code's integrated terminal, it will run on the architecture of the VS Code installation. Therefore if you installed NodeJS or adding packages via the integrated terminal, it will use the wrong architecture and not match your host system. You can check the architecture of your NodeJS installation by running `node -p process.arch` in the terminal.
296+
297+
This error comes from when you build Session's native modules e.g. `better-sqlite3`, `libsession_util_nodejs`, they have been compiled for the wrong cpu architecture.
298+
299+
</details>
300+
287301
## Hot reloading
288302

289303
More often than not, you'll need to restart the application regularly to see your changes, as there

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ Session integrates directly with [Oxen Service Nodes](https://docs.oxen.io/about
1212

1313
## Want to Contribute? Found a Bug or Have a feature request?
1414

15-
Please search for any [existing issues](https://github.com/session-foundation/session-desktop/issues) that describe your bug in order to avoid duplicate submissions.
15+
Please search for any [existing issues](https://github.com/session-foundation/session-desktop/issues) that describe your bug or feature request to avoid duplicate submissions.
1616

1717
Submissions can be made by making a pull request to our development branch.If you don't know where to start contributing please read [Contributing.md](CONTRIBUTING.md) and refer to issues tagged with the [good-first-issue](https://github.com/session-foundation/session-desktop/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) tag.
1818

1919
## Supported platforms
2020

21-
Session requires Windows 10 or later, macOS Ventura (13) or later, or a Linux distribution with glibc 2.28 or later like Debian 10 or Ubuntu 22.04.
21+
Check Session's system requirements and what platforms are supported [here](https://github.com/session-foundation/session-desktop/releases/latest#user-content-supported-platforms).
2222

2323
## Build instructions
2424

_locales/af/messages.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,6 @@
250250
"copy": "Kopieer",
251251
"create": "Skep",
252252
"cut": "Sny",
253-
"databaseErrorGeneric": "’n Databasisfout het voorgekom.<br/><br/>Voer jou toepassingslogboeke uit om te deel vir foutsporing. Indien dit onsuksesvol is, herinstalleer Session en herstel jou rekening.<br/><br/>Waarskuwing: Dit sal lei tot die verlies van alle boodskappe, aanhegsels, en rekeningdata ouer as twee weke.",
254253
"databaseErrorTimeout": "Ons het opgemerk Session neem lank om te begin.<br/><br/>Jy kan aanhou wag, jou toestel logs uitvoer om te deel vir foutsporing, of probeer om Session te herbegin.",
255254
"databaseErrorUpdate": "Jou app databasis is onversoenbaar met hierdie weergawe van Session. Herinstalleer die app en herstel jou rekening om 'n nuwe databasis te genereer en voort te gaan met die gebruik van Session.<br/><br/>Waarskuwing: Dit sal lei tot die verlies van alle boodskappe en aanhegsels ouer as twee weke.",
256255
"databaseOptimizing": "Optimalisering databasis",
@@ -371,7 +370,6 @@
371370
"groupCreate": "Skep Groep",
372371
"groupCreateErrorNoMembers": "Kies ten minste een ander groep lid.",
373372
"groupDelete": "Skrap Groep",
374-
"groupDeleteDescription": "Is jy seker jy wil <b>{group_name}</b> verwyder? Dit sal alle lede verwyder en alle groepinhoud skrap.",
375373
"groupDescriptionEnter": "Voer 'n groep beskrywing in",
376374
"groupDisplayPictureUpdated": "Groep vertoon prent opgedateer.",
377375
"groupEdit": "Wysig Groep",

_locales/ar/messages.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@
252252
"copy": "نسخ",
253253
"create": "إنشاء",
254254
"cut": "قص",
255-
"databaseErrorGeneric": "حدث خطأ في قاعدة البيانات.<br/> <br/> صدر سجلات التطبيق الخاصة بك للمشاركة في استكشاف الأخطاء وإصلاحها. إذا لم ينجح ذلك، أعد تثبيت Session واستعد حسابك. <br/> <br/>تحذير: سيؤدي ذلك إلى فقدان جميع الرسائل والمرفقات وبيانات الحساب التي يزيد عمرها عن أسبوعين.",
256255
"databaseErrorTimeout": "لقد لاحظنا أن Session يستغرق وقتًا طويلاً لبدء.<br/><br/>يمكنك مواصلة الانتظار، تصدير سجلات الجهاز للمشاركة في استكشاف الأخطاء وإصلاحها، أو محاولة إعادة تشغيل Session.",
257256
"databaseErrorUpdate": "قاعدة بيانات تطبيقك غير متوافقة مع هذا الإصدار من Session. أعد تثبيت التطبيق واستعد حسابك لإنشاء قاعدة بيانات جديدة ومتابعة استخدام Session.<br/><br/>تحذير: سيؤدي هذا إلى فقدان جميع الرسائل والمرفقات التي يزيد عمرها عن أسبوعين.",
258257
"databaseOptimizing": "تحسين قاعدة البيانات",
@@ -375,7 +374,6 @@
375374
"groupCreate": "إنشاء مجموعة",
376375
"groupCreateErrorNoMembers": "الرجاء إختيار عضو اخر على الأقل.",
377376
"groupDelete": "حذف مجموعة",
378-
"groupDeleteDescription": "هل أنت متأكد من حذف <b>{group_name}؟</b> سيؤدي ذلك إلى إزالة جميع الأعضاء وحذف كافة محتويات المجموعة.",
379377
"groupDeletedMemberDescription": "{group_name} تم حذفه بواسطة مشرف المجموعة. لن تتمكن من إرسال أي رسائل أخرى.",
380378
"groupDescriptionEnter": "أدخل وصف للمجموعة",
381379
"groupDisplayPictureUpdated": "تم تحديث صورة العرض للمجموعة.",

0 commit comments

Comments
 (0)