From 72e22b415d42a3080cc1b90c430d3e3869e63207 Mon Sep 17 00:00:00 2001
From: Jake Runzer <jakerunzer@gmail.com>
Date: Mon, 21 Oct 2024 21:14:12 -0400
Subject: [PATCH 1/3] publish to npm as part of release workflow

---
 .github/workflows/release.yml | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 7581c6acc..cca2b5c87 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -189,6 +189,33 @@ jobs:
           GH_REPO: ${{ github.repository }}
         run: gh release edit "${{ needs.create-release.outputs.railway_version }}" --draft=false
 
+  publish-npm:
+    name: Publish NPM
+    needs: ["create-release", "build-release", "publish-release"]
+    runs-on: ubuntu-lates
+
+    steps:
+      - name: Use Node.js 20
+        uses: actions/setup-node@v1
+        with:
+          node-version: 20
+          registry-url: https://registry.npmjs.org/
+
+      - name: Setup Git user
+        run: |
+          git config --global user.name "Github Bot"
+          git config --global user.email "github-bot@railway.app"
+
+      - name: Create .npmrc file
+        run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
+        env:
+          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
+
+      - name: NPM publish
+        run: npm publish --access public
+        env:
+          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
+
   notify-release:
     name: Notify Release
     needs: ["create-release", "build-release", "publish-release"]

From 2e8577dfa385e3c628d41467c7468b67dff39a62 Mon Sep 17 00:00:00 2001
From: Jake Runzer <jakerunzer@gmail.com>
Date: Mon, 21 Oct 2024 21:14:42 -0400
Subject: [PATCH 2/3] delete separate publish-npm workflow file

---
 .github/workflows/publish-npm.yml | 40 -------------------------------
 1 file changed, 40 deletions(-)
 delete mode 100644 .github/workflows/publish-npm.yml

diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml
deleted file mode 100644
index c93c1f00d..000000000
--- a/.github/workflows/publish-npm.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-name: Publish to NPM
-
-on:
-  release:
-    types:
-    - published
-
-jobs:
-  publish-npm:
-    name: Publish to NPM
-    runs-on: ubuntu-latest
-
-    steps:
-      - name: Checkout code
-        uses: actions/checkout@v4
-
-      - name: Set version
-        id: vars
-        run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
-
-      - name: Use Node.js 20
-        uses: actions/setup-node@v1
-        with:
-          node-version: 20
-          registry-url: https://registry.npmjs.org/
-
-      - name: Setup Git user
-        run: |
-          git config --global user.name "Github Bot"
-          git config --global user.email "github-bot@railway.app"
-
-      - name: Create .npmrc file
-        run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
-        env:
-          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
-
-      - name: NPM publish
-        run: npm publish --access public
-        env:
-          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

From d47c356fc5b891fb03966602975f156d76fccff6 Mon Sep 17 00:00:00 2001
From: Jake Runzer <jakerunzer@gmail.com>
Date: Mon, 21 Oct 2024 21:15:24 -0400
Subject: [PATCH 3/3] update nodejs version

---
 .github/workflows/release.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index cca2b5c87..7e467f917 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -195,10 +195,10 @@ jobs:
     runs-on: ubuntu-lates
 
     steps:
-      - name: Use Node.js 20
+      - name: Use Node.js
         uses: actions/setup-node@v1
         with:
-          node-version: 20
+          node-version: 22
           registry-url: https://registry.npmjs.org/
 
       - name: Setup Git user