mirror of
https://github.com/zadam/trilium.git
synced 2025-10-08 14:42:29 +08:00
chore(dx/ci): remove most references to NX, apart from unit test
This commit is contained in:
parent
ce0fd3cec2
commit
e18a8556c1
7 changed files with 8 additions and 41 deletions
2
.github/actions/build-electron/action.yml
vendored
2
.github/actions/build-electron/action.yml
vendored
|
@ -86,7 +86,7 @@ runs:
|
||||||
APPLE_ID_PASSWORD: ${{ env.APPLE_ID_PASSWORD }}
|
APPLE_ID_PASSWORD: ${{ env.APPLE_ID_PASSWORD }}
|
||||||
WINDOWS_SIGN_EXECUTABLE: ${{ env.WINDOWS_SIGN_EXECUTABLE }}
|
WINDOWS_SIGN_EXECUTABLE: ${{ env.WINDOWS_SIGN_EXECUTABLE }}
|
||||||
TRILIUM_ARTIFACT_NAME_HINT: TriliumNotes-${{ github.ref_name }}-${{ inputs.os }}-${{ inputs.arch }}
|
TRILIUM_ARTIFACT_NAME_HINT: TriliumNotes-${{ github.ref_name }}-${{ inputs.os }}-${{ inputs.arch }}
|
||||||
run: pnpm nx --project=desktop electron-forge:make -- --arch=${{ inputs.arch }} --platform=${{ inputs.forge_platform }}
|
run: pnpm run --filter desktop electron-forge:make -- --arch=${{ inputs.arch }} --platform=${{ inputs.forge_platform }}
|
||||||
|
|
||||||
# Add DMG signing step
|
# Add DMG signing step
|
||||||
- name: Sign DMG
|
- name: Sign DMG
|
||||||
|
|
2
.github/actions/build-server/action.yml
vendored
2
.github/actions/build-server/action.yml
vendored
|
@ -23,7 +23,7 @@ runs:
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
pnpm run chore:update-build-info
|
pnpm run chore:update-build-info
|
||||||
pnpm nx --project=server package
|
pnpm server:package
|
||||||
- name: Prepare artifacts
|
- name: Prepare artifacts
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
32
.github/workflows/dev.yml
vendored
32
.github/workflows/dev.yml
vendored
|
@ -19,33 +19,9 @@ permissions:
|
||||||
pull-requests: write # for PR comments
|
pull-requests: write # for PR comments
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-affected:
|
|
||||||
name: Check affected jobs (NX)
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout the repository
|
|
||||||
uses: actions/checkout@v5
|
|
||||||
with:
|
|
||||||
fetch-depth: 0 # needed for https://github.com/marketplace/actions/nx-set-shas
|
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v4
|
|
||||||
- name: Set up node & dependencies
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 22
|
|
||||||
cache: 'pnpm'
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install --frozen-lockfile
|
|
||||||
|
|
||||||
- uses: nrwl/nx-set-shas@v4
|
|
||||||
- name: Check affected
|
|
||||||
run: pnpm nx affected --verbose -t typecheck build rebuild-deps test-build
|
|
||||||
|
|
||||||
test_dev:
|
test_dev:
|
||||||
name: Test development
|
name: Test development
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
|
||||||
- check-affected
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the repository
|
- name: Checkout the repository
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
|
@ -66,7 +42,6 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- test_dev
|
- test_dev
|
||||||
- check-affected
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v4
|
||||||
|
@ -75,7 +50,7 @@ jobs:
|
||||||
- name: Update build info
|
- name: Update build info
|
||||||
run: pnpm run chore:update-build-info
|
run: pnpm run chore:update-build-info
|
||||||
- name: Trigger client build
|
- name: Trigger client build
|
||||||
run: pnpm nx run client:build
|
run: pnpm client:build
|
||||||
- name: Send client bundle stats to RelativeCI
|
- name: Send client bundle stats to RelativeCI
|
||||||
if: false
|
if: false
|
||||||
uses: relative-ci/agent-action@v3
|
uses: relative-ci/agent-action@v3
|
||||||
|
@ -83,7 +58,7 @@ jobs:
|
||||||
webpackStatsFile: ./apps/client/dist/webpack-stats.json
|
webpackStatsFile: ./apps/client/dist/webpack-stats.json
|
||||||
key: ${{ secrets.RELATIVE_CI_CLIENT_KEY }}
|
key: ${{ secrets.RELATIVE_CI_CLIENT_KEY }}
|
||||||
- name: Trigger server build
|
- name: Trigger server build
|
||||||
run: pnpm nx run server:build
|
run: pnpm run server:build
|
||||||
- uses: docker/setup-buildx-action@v3
|
- uses: docker/setup-buildx-action@v3
|
||||||
- uses: docker/build-push-action@v6
|
- uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
|
@ -95,7 +70,6 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- build_docker
|
- build_docker
|
||||||
- check-affected
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
@ -112,7 +86,7 @@ jobs:
|
||||||
- name: Update build info
|
- name: Update build info
|
||||||
run: pnpm run chore:update-build-info
|
run: pnpm run chore:update-build-info
|
||||||
- name: Trigger build
|
- name: Trigger build
|
||||||
run: pnpm nx run server:build
|
run: pnpm server:build
|
||||||
|
|
||||||
- name: Set IMAGE_NAME to lowercase
|
- name: Set IMAGE_NAME to lowercase
|
||||||
run: echo "IMAGE_NAME=${IMAGE_NAME,,}" >> $GITHUB_ENV
|
run: echo "IMAGE_NAME=${IMAGE_NAME,,}" >> $GITHUB_ENV
|
||||||
|
|
1
.github/workflows/nightly.yml
vendored
1
.github/workflows/nightly.yml
vendored
|
@ -57,7 +57,6 @@ jobs:
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
- uses: nrwl/nx-set-shas@v4
|
|
||||||
- name: Update nightly version
|
- name: Update nightly version
|
||||||
run: npm run chore:ci-update-nightly-version
|
run: npm run chore:ci-update-nightly-version
|
||||||
- name: Run the build
|
- name: Run the build
|
||||||
|
|
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
|
@ -41,7 +41,6 @@ jobs:
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
- uses: nrwl/nx-set-shas@v4
|
|
||||||
- name: Run the build
|
- name: Run the build
|
||||||
uses: ./.github/actions/build-electron
|
uses: ./.github/actions/build-electron
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -169,12 +169,6 @@
|
||||||
"runBuildTargetDependencies": false
|
"runBuildTargetDependencies": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"package": {
|
|
||||||
"dependsOn": [
|
|
||||||
"build"
|
|
||||||
],
|
|
||||||
"command": "bash apps/server/scripts/build-server.sh"
|
|
||||||
},
|
|
||||||
"start-prod": {
|
"start-prod": {
|
||||||
"dependsOn": [
|
"dependsOn": [
|
||||||
"build"
|
"build"
|
||||||
|
@ -320,7 +314,8 @@
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "cross-env NODE_ENV=development TRILIUM_ENV=dev TRILIUM_DATA_DIR=data TRILIUM_RESOURCE_DIR=src tsx watch --ignore '../client/node_modules/.vite-temp' ./src/main.ts",
|
"dev": "cross-env NODE_ENV=development TRILIUM_ENV=dev TRILIUM_DATA_DIR=data TRILIUM_RESOURCE_DIR=src tsx watch --ignore '../client/node_modules/.vite-temp' ./src/main.ts",
|
||||||
"build": "tsx scripts/build.ts"
|
"build": "tsx scripts/build.ts",
|
||||||
|
"package": "pnpm build && bash scripts/build-server.sh"
|
||||||
},
|
},
|
||||||
"main": "./src/main.ts"
|
"main": "./src/main.ts"
|
||||||
}
|
}
|
|
@ -11,7 +11,7 @@ async function main() {
|
||||||
|
|
||||||
// Copy node modules dependencies
|
// Copy node modules dependencies
|
||||||
build.copyNodeModules([ "better-sqlite3", "bindings", "file-uri-to-path" ]);
|
build.copyNodeModules([ "better-sqlite3", "bindings", "file-uri-to-path" ]);
|
||||||
build.copy("node_modules/jsdom/lib/jsdom/living/xhr/xhr-sync-worker.js", "xhr-sync-worker.js");
|
build.copy("/node_modules/jsdom/lib/jsdom/living/xhr/xhr-sync-worker.js", "xhr-sync-worker.js");
|
||||||
|
|
||||||
// Integrate the client.
|
// Integrate the client.
|
||||||
build.triggerBuildAndCopyTo("apps/client", "public/");
|
build.triggerBuildAndCopyTo("apps/client", "public/");
|
||||||
|
|
Loading…
Add table
Reference in a new issue