From 792ce04b4916e110bd5d6e41e7f84286d01b86c1 Mon Sep 17 00:00:00 2001 From: Je Xia Date: Mon, 13 Jan 2025 16:17:54 +0800 Subject: [PATCH] Update release action (#1007) --- .github/workflows/release.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cbd1446f..8b7268a1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -66,6 +66,8 @@ jobs: platforms: linux/amd64,linux/arm64 tags: ghcr.io/esm-dev/esm.sh:latest,ghcr.io/esm-dev/esm.sh:${{ github.ref_name }} build-args: SERVER_VERSION=${{ github.ref_name }} + env: + DOCKER_BUILD_RECORD_UPLOAD: false build_esmsh_cli: name: Build esm.sh CLI @@ -121,6 +123,10 @@ jobs: path: cli/tmp/bin/esm.sh${{ matrix.ext }} if-no-files-found: error + - name: Create package.json + run: echo "const[minor,patch='0']='${{ github.ref_name }}'.slice(1).split('_');const p=JSON.parse(require('fs').readFileSync('../npm/package.json','utf8'));console.log(JSON.stringify({...p,name:'@esm.sh/cli-${{ matrix.os }}-${{ matrix.arch }}',version:['0',minor,patch].join('.'),os:['${{ matrix.os }}'],cpu:['${{ matrix.arch }}'.replace('amd','x')],bin:void 0,scripts:void 0,optionalDependencies:void 0}))" | node > package.json + working-directory: cli/tmp + publish_esmsh_to_npm: name: Publish package "esm.sh" to NPM runs-on: ubuntu-latest @@ -145,12 +151,6 @@ jobs: 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 working-directory: cli/npm - - name: Publish Package - run: npm publish --provenance --access public - working-directory: cli/npm - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - release: name: Release runs-on: ubuntu-latest