mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-19 02:10:04 +08:00
Merge branch 'develop' of https://github.com/TriliumNext/Notes into develop
This commit is contained in:
commit
13239500f9
@ -15,3 +15,9 @@ indent_size = 2
|
|||||||
indent_style = space
|
indent_style = space
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.yml]
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
34
.github/actions/build-electron/action.yml
vendored
Normal file
34
.github/actions/build-electron/action.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
inputs:
|
||||||
|
os:
|
||||||
|
description: "One of the supported platforms: macos, linux, windows"
|
||||||
|
required: true
|
||||||
|
arch:
|
||||||
|
description: "The architecture to build for: x64, arm64"
|
||||||
|
required: true
|
||||||
|
extension:
|
||||||
|
description: "Platform specific extension to build: dmg, deb, exe"
|
||||||
|
required: true
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Set up Python for appdmg to be installed
|
||||||
|
if: ${{ inputs.os == 'macos' }}
|
||||||
|
shell: bash
|
||||||
|
run: brew install python-setuptools
|
||||||
|
- name: Install dependencies
|
||||||
|
shell: bash
|
||||||
|
run: npm ci
|
||||||
|
- name: Update build info
|
||||||
|
shell: bash
|
||||||
|
run: npm run update-build-info
|
||||||
|
- name: Run electron-forge
|
||||||
|
shell: bash
|
||||||
|
run: npm run make-electron -- --arch=${{ inputs.arch }}
|
||||||
|
- name: Prepare artifacts
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir -p upload
|
||||||
|
file=$(find out/make -name '*.zip' -print -quit)
|
||||||
|
cp "$file" "upload/TriliumNextNotes-${{ github.ref_name }}-${{ inputs.os }}-${{ inputs.arch }}.zip"
|
||||||
|
file=$(find out/make -name '*.${{ matrix.os.extension }}' -print -quit)
|
||||||
|
cp "$file" "upload/TriliumNextNotes-${{ github.ref_name }}-${{ inputs.os }}-${{ inputs.arch }}.${{ matrix.os.extension }}"
|
28
.github/actions/build-server/action.yml
vendored
Normal file
28
.github/actions/build-server/action.yml
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
inputs:
|
||||||
|
arch:
|
||||||
|
description: "The architecture to build for: x64, arm64"
|
||||||
|
required: true
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Set up node & dependencies
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
cache: "npm"
|
||||||
|
- name: Install dependencies
|
||||||
|
shell: bash
|
||||||
|
run: npm ci
|
||||||
|
- name: Run Linux server build
|
||||||
|
env:
|
||||||
|
MATRIX_ARCH: ${{ inputs.arch }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
npm run update-build-info
|
||||||
|
./bin/build-server.sh
|
||||||
|
- name: Prepare artifacts
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir -p upload
|
||||||
|
file=$(find dist -name '*.tar.xz' -print -quit)
|
||||||
|
cp "$file" "upload/TriliumNextNotes-linux-${{ inputs.arch }}-${{ github.ref_name }}.tar.xz"
|
51
.github/workflows/main.yml
vendored
51
.github/workflows/main.yml
vendored
@ -37,31 +37,12 @@ jobs:
|
|||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
- name: Set up Python for appdmg to be installed
|
- name: Run the build
|
||||||
if: ${{ matrix.os.name == 'macos' }}
|
uses: ./.github/actions/build-electron
|
||||||
run: brew install python-setuptools
|
with:
|
||||||
- name: Install dependencies
|
os: ${{ matrix.os.name }}
|
||||||
run: npm ci
|
arch: ${{ matrix.arch }}
|
||||||
- name: Update build info
|
extension: ${{ matrix.os.extension }}
|
||||||
run: npm run update-build-info
|
|
||||||
- name: Run electron-forge
|
|
||||||
run: npm run make-electron -- --arch=${{ matrix.arch }}
|
|
||||||
- name: Prepare artifacts (Unix)
|
|
||||||
if: runner.os != 'windows'
|
|
||||||
run: |
|
|
||||||
mkdir -p upload
|
|
||||||
file=$(find out/make -name '*.zip' -print -quit)
|
|
||||||
cp "$file" "upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}-${{ github.ref_name }}.zip"
|
|
||||||
file=$(find out/make -name '*.${{ matrix.os.extension }}' -print -quit)
|
|
||||||
cp "$file" "upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}-${{ github.ref_name }}.${{ matrix.os.extension }}"
|
|
||||||
- name: Prepare artifacts (Windows)
|
|
||||||
if: runner.os == 'windows'
|
|
||||||
run: |
|
|
||||||
mkdir upload
|
|
||||||
$file = Get-ChildItem -Path out/make -Filter '*.zip' -Recurse | Select-Object -First 1
|
|
||||||
Copy-Item -Path $file.FullName -Destination "upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}-${{ github.ref_name }}.zip"
|
|
||||||
$file = Get-ChildItem -Path out/make -Filter '*.${{ matrix.os.extension }}' -Recurse | Select-Object -First 1
|
|
||||||
Copy-Item -Path $file.FullName -Destination "upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}-${{ github.ref_name }}.${{ matrix.os.extension }}"
|
|
||||||
- name: Publish artifacts
|
- name: Publish artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
@ -86,24 +67,10 @@ jobs:
|
|||||||
runs-on: ${{ matrix.runs-on }}
|
runs-on: ${{ matrix.runs-on }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Set up node & dependencies
|
- name: Run the build
|
||||||
uses: actions/setup-node@v4
|
uses: ./.github/actions/build-server
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
arch: ${{ matrix.arch }}
|
||||||
cache: "npm"
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
- name: Run Linux server build
|
|
||||||
env:
|
|
||||||
MATRIX_ARCH: ${{ matrix.arch }}
|
|
||||||
run: |
|
|
||||||
npm run update-build-info
|
|
||||||
./bin/build-server.sh
|
|
||||||
- name: Prepare artifacts
|
|
||||||
run: |
|
|
||||||
mkdir -p upload
|
|
||||||
file=$(find dist -name '*.tar.xz' -print -quit)
|
|
||||||
cp "$file" "upload/TriliumNextNotes-linux-${{ matrix.arch }}-${{ github.ref_name }}.tar.xz"
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: TriliumNextNotes linux server ${{ matrix.arch }}
|
name: TriliumNextNotes linux server ${{ matrix.arch }}
|
||||||
|
67
.github/workflows/nightly.yml
vendored
67
.github/workflows/nightly.yml
vendored
@ -34,45 +34,14 @@ jobs:
|
|||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
- name: Set up Python for appdmg to be installed
|
|
||||||
if: ${{ matrix.os.name == 'macos' }}
|
|
||||||
run: brew install python-setuptools
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
- name: Update build info
|
|
||||||
run: npm run update-build-info
|
|
||||||
- name: Update nightly version
|
- name: Update nightly version
|
||||||
run: npm run ci-update-nightly-version
|
run: npm run ci-update-nightly-version
|
||||||
- name: Run electron-forge
|
- name: Run the build
|
||||||
run: npm run make-electron -- --arch=${{ matrix.arch }}
|
uses: ./.github/actions/build-electron
|
||||||
- name: Prepare artifacts (Unix)
|
|
||||||
if: runner.os != 'windows'
|
|
||||||
run: |
|
|
||||||
mkdir -p upload
|
|
||||||
file=$(find out/make -name '*.zip' -print -quit)
|
|
||||||
cp "$file" "upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}.zip"
|
|
||||||
file=$(find out/make -name '*.${{ matrix.os.extension }}' -print -quit)
|
|
||||||
cp "$file" "upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}.${{ matrix.os.extension }}"
|
|
||||||
- name: Prepare artifacts (Windows)
|
|
||||||
if: runner.os == 'windows'
|
|
||||||
run: |
|
|
||||||
mkdir upload
|
|
||||||
$file = Get-ChildItem -Path out/make -Filter '*.zip' -Recurse | Select-Object -First 1
|
|
||||||
Copy-Item -Path $file.FullName -Destination "upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}.zip"
|
|
||||||
$file = Get-ChildItem -Path out/make -Filter '*.${{ matrix.os.extension }}' -Recurse | Select-Object -First 1
|
|
||||||
Copy-Item -Path $file.FullName -Destination "upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}.${{ matrix.os.extension }}"
|
|
||||||
- name: Publish artifacts
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
with:
|
||||||
name: TriliumNextNotes ${{ matrix.os.name }} ${{ matrix.arch }}
|
os: ${{ matrix.os.name }}
|
||||||
path: upload/*.zip
|
arch: ${{ matrix.arch }}
|
||||||
overwrite: true
|
extension: ${{ matrix.os.extension }}
|
||||||
- name: Publish installer artifacts
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: TriliumNextNotes ${{ matrix.os.name }} ${{ matrix.arch }}
|
|
||||||
path: upload/*.${{ matrix.os.extension }}
|
|
||||||
overwrite: true
|
|
||||||
|
|
||||||
- name: Deploy release
|
- name: Deploy release
|
||||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||||
@ -82,6 +51,7 @@ jobs:
|
|||||||
asset_path: upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}.zip # path to archive to upload
|
asset_path: upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}.zip # path to archive to upload
|
||||||
asset_name: TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}-nightly.zip # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash
|
asset_name: TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}-nightly.zip # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash
|
||||||
asset_content_type: application/zip # required by GitHub API
|
asset_content_type: application/zip # required by GitHub API
|
||||||
|
|
||||||
- name: Deploy installer release
|
- name: Deploy installer release
|
||||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||||
with:
|
with:
|
||||||
@ -104,28 +74,11 @@ jobs:
|
|||||||
runs-on: ${{ matrix.runs-on }}
|
runs-on: ${{ matrix.runs-on }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Set up node & dependencies
|
|
||||||
uses: actions/setup-node@v4
|
- name: Run the build
|
||||||
|
uses: ./.github/actions/build-server
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
arch: ${{ matrix.arch }}
|
||||||
cache: "npm"
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
- name: Run Linux server build
|
|
||||||
env:
|
|
||||||
MATRIX_ARCH: ${{ matrix.arch }}
|
|
||||||
run: |
|
|
||||||
npm run update-build-info
|
|
||||||
./bin/build-server.sh
|
|
||||||
- name: Prepare artifacts
|
|
||||||
run: |
|
|
||||||
mkdir -p upload
|
|
||||||
file=$(find dist -name '*.tar.xz' -print -quit)
|
|
||||||
cp "$file" "upload/TriliumNextNotes-linux-${{ matrix.arch }}-${{ github.ref_name }}.tar.xz"
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: TriliumNextNotes linux server ${{ matrix.arch }}
|
|
||||||
path: upload/TriliumNextNotes-linux-${{ matrix.arch }}-${{ github.ref_name }}.tar.xz
|
|
||||||
|
|
||||||
- name: Deploy release
|
- name: Deploy release
|
||||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||||
|
53
.github/workflows/release.yml
vendored
53
.github/workflows/release.yml
vendored
@ -34,31 +34,12 @@ jobs:
|
|||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
- name: Set up Python for appdmg to be installed
|
- name: Run the build
|
||||||
if: ${{ matrix.os.name == 'macos' }}
|
uses: ./.github/actions/build-electron
|
||||||
run: brew install python-setuptools
|
with:
|
||||||
- name: Install dependencies
|
os: ${{ matrix.os.name }}
|
||||||
run: npm ci
|
arch: ${{ matrix.arch }}
|
||||||
- name: Update build info
|
extension: ${{ matrix.os.extension }}
|
||||||
run: npm run update-build-info
|
|
||||||
- name: Run electron-forge
|
|
||||||
run: npm run make-electron -- --arch=${{ matrix.arch }}
|
|
||||||
- name: Prepare artifacts (Unix)
|
|
||||||
if: runner.os != 'windows'
|
|
||||||
run: |
|
|
||||||
mkdir -p upload
|
|
||||||
file=$(find out/make -name '*.zip' -print -quit)
|
|
||||||
cp "$file" "upload/TriliumNextNotes-${{ github.ref_name }}-${{ matrix.os.name }}-${{ matrix.arch }}.zip"
|
|
||||||
file=$(find out/make -name '*.${{ matrix.os.extension }}' -print -quit)
|
|
||||||
cp "$file" "upload/TriliumNextNotes-${{ github.ref_name }}-${{ matrix.os.name }}-${{ matrix.arch }}.${{ matrix.os.extension }}"
|
|
||||||
- name: Prepare artifacts (Windows)
|
|
||||||
if: runner.os == 'windows'
|
|
||||||
run: |
|
|
||||||
mkdir upload
|
|
||||||
$file = Get-ChildItem -Path out/make -Filter '*.zip' -Recurse | Select-Object -First 1
|
|
||||||
Copy-Item -Path $file.FullName -Destination "upload/TriliumNextNotes-${{ github.ref_name }}-${{ matrix.os.name }}-${{ matrix.arch }}.zip"
|
|
||||||
$file = Get-ChildItem -Path out/make -Filter '*.${{ matrix.os.extension }}' -Recurse | Select-Object -First 1
|
|
||||||
Copy-Item -Path $file.FullName -Destination "upload/TriliumNextNotes-${{ github.ref_name }}-${{ matrix.os.name }}-${{ matrix.arch }}.${{ matrix.os.extension }}"
|
|
||||||
- name: Publish release
|
- name: Publish release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
@ -79,24 +60,12 @@ jobs:
|
|||||||
runs-on: ${{ matrix.runs-on }}
|
runs-on: ${{ matrix.runs-on }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Set up node & dependencies
|
|
||||||
uses: actions/setup-node@v4
|
- name: Run the build
|
||||||
|
uses: ./.github/actions/build-server
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
arch: ${{ matrix.arch }}
|
||||||
cache: "npm"
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
- name: Run Linux server build
|
|
||||||
env:
|
|
||||||
MATRIX_ARCH: ${{ matrix.arch }}
|
|
||||||
run: |
|
|
||||||
npm run update-build-info
|
|
||||||
./bin/build-server.sh
|
|
||||||
- name: Prepare artifacts
|
|
||||||
run: |
|
|
||||||
mkdir -p upload
|
|
||||||
file=$(find dist -name '*.tar.xz' -print -quit)
|
|
||||||
cp "$file" "upload/TriliumNextNotes-linux-${{ matrix.arch }}-${{ github.ref_name }}.tar.xz"
|
|
||||||
- name: Publish release
|
- name: Publish release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user