Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading