Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

ci: revise workflows to use .nvmrc (node 18) (#1290)

hehe693e7b204b95
diff --git a/.github/workflows/build-test-version.yml b/.github/workflows/build-test-version.yml
index 84a7379d50..417c65ab31 100644
--- a/.github/workflows/build-test-version.yml
+++ b/.github/workflows/build-test-version.yml
@@ -25,11 +25,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
-
- - name: Use Node.js
- uses: actions/setup-node@v3
+ - uses: actions/setup-node@v3
with:
- node-version: 18.x
+ node-version-file: '.nvmrc'
registry-url: https://npm.pkg.github.com
scope: '@toeverything'
cache: 'pnpm'
@@ -47,8 +45,7 @@ jobs:
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-
- - name: Install dependencies
- run: pnpm install --no-frozen-lockfile
+ - run: pnpm i --no-frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_GITHUB_AUTH_TOKEN }}
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index ebe46ea453..87316dcbdc 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -24,11 +24,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
-
- - name: Use Node.js
- uses: actions/setup-node@v3
+ - uses: actions/setup-node@v3
with:
- node-version: 18.x
+ node-version-file: '.nvmrc'
cache: 'pnpm'
- name: Restore cache
@@ -43,7 +41,7 @@ jobs:
${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-
- name: Build
- run: pnpm install && pnpm build
+ run: pnpm i && pnpm build
env:
NEXT_PUBLIC_FIREBASE_API_KEY: ${{ secrets.NEXT_PUBLIC_FIREBASE_API_KEY }}
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: ${{ secrets.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN }}
@@ -72,14 +70,11 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
-
- uses: actions/setup-node@v3
with:
- node-version: 18.x
+ node-version-file: '.nvmrc'
cache: 'pnpm'
-
- - name: Install dependencies
- run: pnpm install --frozen-lockfile
+ - run: pnpm i
- name: Download artifact
uses: actions/download-artifact@v3
@@ -131,11 +126,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
-
- - name: Use Node.js
- uses: actions/setup-node@v3
+ - uses: actions/setup-node@v3
with:
- node-version: 18.x
+ node-version-file: '.nvmrc'
registry-url: https://npm.pkg.github.com
scope: '@toeverything'
cache: 'pnpm'
@@ -153,8 +146,7 @@ jobs:
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-
- - name: Install dependencies
- run: pnpm install --no-frozen-lockfile
+ - run: pnpm i --no-frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_GITHUB_AUTH_TOKEN }}
diff --git a/.github/workflows/changlog.yml b/.github/workflows/changlog.yml
index ad6e8473d3..cf04ae9a6f 100644
--- a/.github/workflows/changlog.yml
+++ b/.github/workflows/changlog.yml
@@ -22,17 +22,15 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
-
- - name: Use Node.js
- uses: actions/setup-node@v3
+ - uses: actions/setup-node@v3
with:
- node-version: 18.x
+ node-version-file: '.nvmrc'
registry-url: https://npm.pkg.github.com
scope: '@toeverything'
cache: 'pnpm'
- name: Install dependencies
- run: pnpm install --no-frozen-lockfile
+ run: pnpm i --no-frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_GITHUB_AUTH_TOKEN }}
diff --git a/.github/workflows/client-app.yml b/.github/workflows/client-app.yml
index 040c56661a..dd07042e17 100644
--- a/.github/workflows/client-app.yml
+++ b/.github/workflows/client-app.yml
@@ -62,23 +62,19 @@ jobs:
runs-on: ${{ matrix.platform }}
steps:
- - name: Checkout repository
- uses: actions/checkout@v3
+ - uses: actions/checkout@v3
+ - uses: pnpm/action-setup@v2
+ - uses: actions/setup-node@v3
with:
- submodules: 'true'
+ node-version-file: '.nvmrc'
+ cache: 'pnpm'
+ - run: pnpm i
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- - name: Install pnpm
- uses: pnpm/action-setup@v2
- - name: Set up Node.js
- uses: actions/setup-node@v3
- with:
- node-version: 18.x
- cache: 'pnpm'
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
@@ -89,9 +85,6 @@ jobs:
workspaces: |
apps/desktop/src-tauri
- - name: Install dependencies
- run: pnpm i -r
-
- name: Make App Binary
run: pnpm build:app
working-directory: apps/desktop
diff --git a/.github/workflows/languages-sync.yml b/.github/workflows/languages-sync.yml
index eb2dbea638..54a443537a 100644
--- a/.github/workflows/languages-sync.yml
+++ b/.github/workflows/languages-sync.yml
@@ -23,28 +23,15 @@ concurrency:
jobs:
main:
- strategy:
- matrix:
- node-version: [18]
- os: [ubuntu-latest]
- runs-on: ${{ matrix.os }}
-
+ runs-on: ubuntu-latest
steps:
- - name: Checkout
- uses: actions/checkout@v3
-
- - name: Use pnpm
- uses: pnpm/action-setup@v2
-
- - name: Use Node.js ${{ matrix.node-version }}
- # https://github.com/actions/setup-node
- uses: actions/setup-node@v3
+ - uses: actions/checkout@v3
+ - uses: pnpm/action-setup@v2
+ - uses: actions/setup-node@v3
with:
- node-version: ${{ matrix.node-version }}
+ node-version-file: '.nvmrc'
cache: 'pnpm'
-
- - name: Install node modules
- run: pnpm install
+ - run: pnpm i
- name: Check Language Key
if: github.ref != 'refs/heads/master'
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index b149ff8226..916c676f2b 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -21,11 +21,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
-
- - name: Use Node.js
- uses: actions/setup-node@v2
+ - uses: actions/setup-node@v3
with:
- node-version: 18.x
+ node-version-file: '.nvmrc'
cache: 'pnpm'
- name: Restore cache
@@ -39,8 +37,7 @@ jobs:
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-
- - name: Install dependencies
- run: pnpm install
+ - run: pnpm i
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_GITHUB_AUTH_TOKEN }}
diff --git a/.github/workflows/update-block-suite.yml b/.github/workflows/update-block-suite.yml
index e4ef649798..f1b1f5c9f7 100644
--- a/.github/workflows/update-block-suite.yml
+++ b/.github/workflows/update-block-suite.yml
@@ -19,21 +19,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- - name: Checkout
- uses: actions/checkout@v3
-
- - name: Use pnpm
- uses: pnpm/action-setup@v2
-
- - name: Use Node.js 18
- # https://github.com/actions/setup-node
- uses: actions/setup-node@v3
+ - uses: actions/checkout@v3
+ - uses: pnpm/action-setup@v2
+ - uses: actions/setup-node@v3
with:
- node-version: '18.X'
+ node-version-file: '.nvmrc'
cache: 'pnpm'
-
- - name: Install dependencies
- run: pnpm install
+ - run: pnpm i
- name: Get old version
id: old-version
diff --git a/.nvmrc b/.nvmrc
index b6a7d89c68..3c032078a4 100644
--- a/.nvmrc
+++ b/.nvmrc
@@ -1 +1 @@
-16
+18
diff --git a/README.md b/README.md
index 2a1b29a081..2f45a0389a 100644
--- a/README.md
+++ b/README.md
@@ -229,6 +229,6 @@ See [LICENSE] for details.
[rust-version-icon]: https://img.shields.io/badge/Rust-1.67-dea584
[stars-icon]: https://img.shields.io/github/stars/toeverything/AFFiNE.svg?style=flat&logo=github&colorB=red&label=stars
[codecov]: https://codecov.io/gh/toeverything/affine/branch/master/graphs/badge.svg?branch=master
-[node-version-icon]: https://img.shields.io/badge/node->=16.0-success
+[node-version-icon]: https://img.shields.io/badge/node->=18.0-success
[typescript-version-icon]: https://img.shields.io/badge/TypeScript-4.9-3178c6
[react-version-icon]: https://img.shields.io/badge/React-18-61dafb