about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVinayak Kulkarni <inbox.vinayak@gmail.com>2024-02-27 07:05:06 +0530
committerGitHub <noreply@github.com>2024-02-26 17:35:06 -0800
commit771999761e9a69d4f884c1c75cf20fde5d149791 (patch)
tree8a15d737c3bc07c46eb6bf2a9733fc866165bdf7
parente9ad3f552d072ed2c818bcb28a90b46ee2027af7 (diff)
downloadvoidsky-771999761e9a69d4f884c1c75cf20fde5d149791.tar.zst
feat(nvm): add support for nvm & minor actions housekeeping (#2979)
* feat: add `.nvmrc` for specifying node version

Co-Authored-By: Evandro Leopoldino Gonçalves <evandrolgoncalves@gmail.com>

* chore(deps): bump setup-node to v4

* build: use node-version-file instead of hardcoded 18.x

* chore(deps): bump nvm version

* fix: checkout before install 🎉

---------

Co-authored-by: Evandro Leopoldino Gonçalves <evandrolgoncalves@gmail.com>
-rw-r--r--.github/workflows/build-submit-android.yml4
-rw-r--r--.github/workflows/build-submit-ios.yml4
-rw-r--r--.github/workflows/lint.yml8
-rw-r--r--.nvmrc1
-rw-r--r--Dockerfile2
-rw-r--r--bskyweb/README.md6
6 files changed, 13 insertions, 12 deletions
diff --git a/.github/workflows/build-submit-android.yml b/.github/workflows/build-submit-android.yml
index 051e95151..6fa177fb0 100644
--- a/.github/workflows/build-submit-android.yml
+++ b/.github/workflows/build-submit-android.yml
@@ -26,9 +26,9 @@ jobs:
         uses: actions/checkout@v4
 
       - name: 🔧 Setup Node
-        uses: actions/setup-node@v3
+        uses: actions/setup-node@v4
         with:
-          node-version: 18.x
+          node-version-file: .nvmrc
           cache: yarn
 
       - name: 🔨 Setup EAS
diff --git a/.github/workflows/build-submit-ios.yml b/.github/workflows/build-submit-ios.yml
index 0fd691bb9..b67678064 100644
--- a/.github/workflows/build-submit-ios.yml
+++ b/.github/workflows/build-submit-ios.yml
@@ -28,9 +28,9 @@ jobs:
         uses: actions/checkout@v4
 
       - name: 🔧 Setup Node
-        uses: actions/setup-node@v3
+        uses: actions/setup-node@v4
         with:
-          node-version: 18.x
+          node-version-file: .nvmrc
           cache: yarn
 
       - name: 🔨 Setup EAS
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 508da536b..9aa55ca07 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -32,12 +32,12 @@ jobs:
     name: Run tests
     runs-on: ubuntu-latest
     steps:
-      - name: Install node 18
-        uses: actions/setup-node@v4
-        with:
-          node-version: 18
       - name: Check out Git repository
         uses: actions/checkout@v3
+      - name: Install node
+        uses: actions/setup-node@v4
+        with:
+          node-version-file: .nvmrc
       - name: Yarn install
         uses: Wandalen/wretry.action@master
         with:
diff --git a/.nvmrc b/.nvmrc
new file mode 100644
index 000000000..3c032078a
--- /dev/null
+++ b/.nvmrc
@@ -0,0 +1 @@
+18
diff --git a/Dockerfile b/Dockerfile
index 47afa61a3..fcd2413cd 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -23,7 +23,7 @@ COPY . .
 RUN mkdir --parents $NVM_DIR && \
   wget \
     --output-document=/tmp/nvm-install.sh \
-    https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh && \
+    https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh && \
   bash /tmp/nvm-install.sh
 
 RUN \. "$NVM_DIR/nvm.sh" && \
diff --git a/bskyweb/README.md b/bskyweb/README.md
index c8efe0448..640c30f4a 100644
--- a/bskyweb/README.md
+++ b/bskyweb/README.md
@@ -6,9 +6,9 @@ To build the SPA bundle (`bundle.web.js`), first get a JavaScript development
 environment set up. Either follow the top-level README, or something quick
 like:
 
-    # install nodejs 18 (specifically)
-    nvm install 18
-    nvm use 18
+    # install nodejs
+    nvm install
+    nvm use
     npm install --global yarn
 
     # setup tools and deps (in top level of this repo)