Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit 4ddc677

Browse files
committed
Merge branch 'develop' into renovate/apple-actions-import-codesign-certs-5.x
2 parents 18e6527 + 7b3c432 commit 4ddc677

File tree

2,422 files changed

+91385
-114454
lines changed

Some content is hidden

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

2,422 files changed

+91385
-114454
lines changed

.dprint.json

Lines changed: 0 additions & 44 deletions
This file was deleted.

.gitattributes

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
package-lock.json linguist-generated=true
22
**/package-lock.json linguist-generated=true
33
src/public/app/doc_notes/en/User[[:space:]]Guide/** linguist-generated=true
4+
src/public/app/doc_notes/en/User[[:space:]]Guide/**/*.md eol=lf
5+
6+
demo/**/*.html eol=lf
7+
demo/**/*.json eol=lf
8+
demo/**/*.svg eol=lf
9+
demo/**/*.txt eol=lf
10+
demo/**/*.js eol=lf
11+
demo/**/*.css eol=lf
12+
413
libraries/** linguist-vendored

.github/FUNDING.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# These are supported funding model platforms
22

3-
github: [zadam]
4-
custom: ["https://paypal.me/za4am"]
3+
github: [eliandoran]
4+
custom: ["https://paypal.me/eliandoran"]

.github/actions/build-electron/action.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,7 @@ runs:
8484
APPLE_ID_PASSWORD: ${{ env.APPLE_ID_PASSWORD }}
8585
WINDOWS_SIGN_EXECUTABLE: ${{ env.WINDOWS_SIGN_EXECUTABLE }}
8686
TRILIUM_ARTIFACT_NAME_HINT: TriliumNextNotes-${{ github.ref_name }}-${{ inputs.os }}-${{ inputs.arch }}
87-
run: |
88-
npm run electron-forge:make -- \
89-
--arch=${{ inputs.arch }} \
90-
--platform=${{ inputs.forge_platform }}
87+
run: npm run electron-forge:make -- --arch=${{ inputs.arch }} --platform=${{ inputs.forge_platform }}
9188

9289
# Add DMG signing step
9390
- name: Sign DMG
@@ -115,6 +112,16 @@ runs:
115112
xcrun notarytool submit "$dmg_file" --apple-id "$APPLE_ID" --password "$APPLE_ID_PASSWORD" --team-id "$APPLE_TEAM_ID" --wait
116113
# Staple the notarization ticket
117114
xcrun stapler staple "$dmg_file"
115+
else
116+
echo "No DMG found to sign"
117+
fi
118+
echo "Using signing identity: $SIGNING_IDENTITY"
119+
# Sign the DMG
120+
codesign --force --sign "$SIGNING_IDENTITY" --options runtime --timestamp "$dmg_file"
121+
# Notarize the DMG
122+
xcrun notarytool submit "$dmg_file" --apple-id "$APPLE_ID" --password "$APPLE_ID_PASSWORD" --team-id "$APPLE_TEAM_ID" --wait
123+
# Staple the notarization ticket
124+
xcrun stapler staple "$dmg_file"
118125
else
119126
echo "No DMG found to sign"
120127
fi

.github/actions/build-server/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ runs:
2828
run: |
2929
mkdir -p upload
3030
file=$(find dist -name '*.tar.xz' -print -quit)
31-
cp "$file" "upload/TriliumNextNotes-Server-${{ github.ref_name }}-${{ inputs.os }}-${{ inputs.arch }}.tar.xz"
31+
name=${{ github.ref_name }}
32+
cp "$file" "upload/TriliumNextNotes-Server-${name//\//-}-${{ inputs.os }}-${{ inputs.arch }}.tar.xz"
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: 'Bundle size reporter'
2+
description: 'Post bundle size difference compared to another branch'
3+
inputs:
4+
branch:
5+
description: 'Branch to compare to'
6+
required: true
7+
default: 'main'
8+
paths:
9+
description:
10+
'Paths to json file bundle size report or folder containing bundles'
11+
required: true
12+
default: '/'
13+
onlyDiff:
14+
description: 'Report only different sizes'
15+
required: false
16+
default: 'false'
17+
filter:
18+
description: 'Regex filter based on file path'
19+
required: false
20+
unit:
21+
description: 'Size unit'
22+
required: false
23+
default: 'KB'
24+
25+
# Comment inputs
26+
comment:
27+
description: 'Post comment'
28+
required: false
29+
default: 'true'
30+
header:
31+
description: 'Comment header'
32+
required: false
33+
default: 'Bundle size report'
34+
append:
35+
description: 'Append comment'
36+
required: false
37+
default: 'false'
38+
ghToken:
39+
description: 'Github token'
40+
required: false
41+
42+
runs:
43+
using: 'composite'
44+
steps:
45+
# Checkout branch to compare to [required]
46+
- name: Checkout base branch
47+
uses: actions/checkout@v4
48+
with:
49+
ref: ${{ inputs.branch }}
50+
path: br-base
51+
token: ${{ inputs.ghToken }}
52+
53+
# Generate the bundle size difference report [required]
54+
- name: Generate report
55+
id: bundleSize
56+
uses: nejcm/[email protected]
57+
with:
58+
paths: ${{ inputs.paths }}
59+
onlyDiff: ${{ inputs.onlyDiff }}
60+
filter: ${{ inputs.filter }}
61+
unit: ${{ inputs.unit }}
62+
63+
# Post github action summary
64+
- name: Post summary
65+
if: ${{ steps.bundleSize.outputs.hasDifferences == 'true' }} # post only in case of changes
66+
run: |
67+
echo '${{ steps.bundleSize.outputs.summary }}' >> $GITHUB_STEP_SUMMARY
68+
shell: bash
69+
70+
# Post github action comment
71+
- name: Post comment
72+
uses: marocchino/sticky-pull-request-comment@v2
73+
if: ${{ steps.bundleSize.outputs.hasDifferences == 'true' }} # post only in case of changes
74+
with:
75+
number: ${{ github.event.pull_request.number }}
76+
header: ${{ inputs.header }}
77+
append: ${{ inputs.append }}
78+
message: '${{ steps.bundleSize.outputs.summary }}'
79+
GITHUB_TOKEN: ${{ inputs.ghToken }}

.github/workflows/codeql.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL Advanced"
13+
14+
on:
15+
push:
16+
branches: [ "develop" ]
17+
pull_request:
18+
branches: [ "develop" ]
19+
schedule:
20+
- cron: '20 7 * * 0'
21+
22+
jobs:
23+
analyze:
24+
name: Analyze (${{ matrix.language }})
25+
# Runner size impacts CodeQL analysis time. To learn more, please see:
26+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
27+
# - https://gh.io/supported-runners-and-hardware-resources
28+
# - https://gh.io/using-larger-runners (GitHub.com only)
29+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
30+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
31+
permissions:
32+
# required for all workflows
33+
security-events: write
34+
35+
# required to fetch internal or private CodeQL packs
36+
packages: read
37+
38+
# only required for workflows in private repositories
39+
actions: read
40+
contents: read
41+
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
include:
46+
- language: actions
47+
build-mode: none
48+
- language: javascript-typescript
49+
build-mode: none
50+
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
51+
# Use `c-cpp` to analyze code written in C, C++ or both
52+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
53+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
54+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
55+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
56+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
57+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
58+
steps:
59+
- name: Checkout repository
60+
uses: actions/checkout@v4
61+
62+
# Add any setup steps before running the `github/codeql-action/init` action.
63+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
64+
# or others). This is typically only required for manual builds.
65+
# - name: Setup runtime (example)
66+
# uses: actions/setup-example@v1
67+
68+
# Initializes the CodeQL tools for scanning.
69+
- name: Initialize CodeQL
70+
uses: github/codeql-action/init@v3
71+
with:
72+
languages: ${{ matrix.language }}
73+
build-mode: ${{ matrix.build-mode }}
74+
# If you wish to specify custom queries, you can do so here or in a config file.
75+
# By default, queries listed here will override any specified in a config file.
76+
# Prefix the list here with "+" to use these queries and those in the config file.
77+
78+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
79+
# queries: security-extended,security-and-quality
80+
81+
# If the analyze step fails for one of the languages you are analyzing with
82+
# "We were unable to automatically build your code", modify the matrix above
83+
# to set the build mode to "manual" for that language. Then modify this step
84+
# to build your code.
85+
# ℹ️ Command-line programs to run using the OS shell.
86+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
87+
- if: matrix.build-mode == 'manual'
88+
shell: bash
89+
run: |
90+
echo 'If you are using a "manual" build mode for one or more of the' \
91+
'languages you are analyzing, replace this with the commands to build' \
92+
'your code, for example:'
93+
echo ' make bootstrap'
94+
echo ' make release'
95+
exit 1
96+
97+
- name: Perform CodeQL Analysis
98+
uses: github/codeql-action/analyze@v3
99+
with:
100+
category: "/language:${{matrix.language}}"

.github/workflows/dev.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,73 @@ env:
1515
IMAGE_NAME: ${{ github.repository_owner }}/notes
1616
TEST_TAG: ${{ github.repository_owner }}/notes:test
1717

18+
permissions:
19+
pull-requests: write # for PR comments
20+
1821
jobs:
22+
report-electron-size:
23+
name: Report Electron size
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout the repository
27+
uses: actions/checkout@v4
28+
29+
- name: Set up node & dependencies
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: 22
33+
cache: "npm"
34+
35+
- run: npm ci
36+
37+
- name: Run the build
38+
uses: ./.github/actions/build-electron
39+
with:
40+
os: linux
41+
arch: x64
42+
shell: bash
43+
forge_platform: linux
44+
45+
- name: Run the Electron size report
46+
uses: ./.github/actions/report-size
47+
with:
48+
paths: 'upload/**/*'
49+
onlyDiff: 'true'
50+
branch: 'develop'
51+
header: 'Electron size report'
52+
unit: "MB"
53+
ghToken: ${{ secrets.GITHUB_TOKEN }}
54+
report-server-size:
55+
name: Report server size
56+
runs-on: ubuntu-latest
57+
steps:
58+
- name: Checkout the repository
59+
uses: actions/checkout@v4
60+
61+
- name: Set up node & dependencies
62+
uses: actions/setup-node@v4
63+
with:
64+
node-version: 22
65+
cache: "npm"
66+
67+
- run: npm ci
68+
69+
- name: Run the build
70+
uses: ./.github/actions/build-server
71+
with:
72+
os: linux
73+
arch: x64
74+
75+
- name: Run the server size report
76+
uses: ./.github/actions/report-size
77+
with:
78+
paths: 'upload/**/*'
79+
onlyDiff: 'true'
80+
branch: 'develop'
81+
header: 'Server size report'
82+
unit: "MB"
83+
ghToken: ${{ secrets.GITHUB_TOKEN }}
84+
1985
test_dev:
2086
name: Test development
2187
runs-on: ubuntu-latest
@@ -44,6 +110,10 @@ jobs:
44110
- test_dev
45111
steps:
46112
- uses: actions/checkout@v4
113+
- name: Install dependencies
114+
run: npm ci
115+
- name: Update build info
116+
run: npm run chore:update-build-info
47117
- uses: docker/setup-buildx-action@v3
48118
- uses: docker/build-push-action@v6
49119
with:
@@ -64,6 +134,12 @@ jobs:
64134
- name: Checkout the repository
65135
uses: actions/checkout@v4
66136

137+
- name: Install dependencies
138+
run: npm ci
139+
140+
- name: Update build info
141+
run: npm run chore:update-build-info
142+
67143
- name: Set IMAGE_NAME to lowercase
68144
run: echo "IMAGE_NAME=${IMAGE_NAME,,}" >> $GITHUB_ENV
69145
- name: Set TEST_TAG to lowercase

.github/workflows/main-docker.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,13 @@ jobs:
131131

132132
- name: Checkout repository
133133
uses: actions/checkout@v4
134+
135+
- name: Install dependencies
136+
run: npm ci
137+
138+
- name: Update build info
139+
run: npm run chore:update-build-info
140+
134141
- name: Docker meta
135142
id: meta
136143
uses: docker/metadata-action@v5

0 commit comments

Comments
 (0)