diff --git a/.github/workflows/build-test-version.yml b/.github/workflows/build-test-version.yml index 84a7379d5..417c65ab3 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 ebe46ea45..87316dcbd 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 ad6e8473d..cf04ae9a6 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 040c56661..dd07042e1 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 eb2dbea63..54a443537 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 b149ff822..916c676f2 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 e4ef64979..f1b1f5c9f 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 b6a7d89c6..3c032078a 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -16 +18 diff --git a/README.md b/README.md index 2a1b29a08..2f45a0389 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