From 2cd7359541c4b78cacc25dea6f871b0a2802dfc3 Mon Sep 17 00:00:00 2001 From: Je Xia Date: Mon, 13 Jan 2025 15:32:35 +0800 Subject: [PATCH] Fix release action (#1005) --- .github/workflows/release.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7e4ff2df..77d8e2e7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -104,7 +104,8 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 + registry-url: 'https://registry.npmjs.org' - name: Build CLI run: go build -ldflags="-s -w -X 'github.com/esm-dev/esm.sh/server.VERSION=${{ github.ref_name }}'" -o cli/tmp/bin/esm.sh${{ matrix.ext }} cli/cmd/main.go @@ -147,7 +148,8 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 + registry-url: 'https://registry.npmjs.org' - name: Update Version run: echo "const fs=require('fs');const[minor,patch='0']='${{ github.ref_name }}'.slice(1).split('_');fs.writeFileSync('package.json',fs.readFileSync('package.json','utf8').replaceAll('*',['0',minor,patch].join('.'),'utf8')" | node