Skip to content

Commit

Permalink
Update release action (#1007)
Browse files Browse the repository at this point in the history
  • Loading branch information
ije authored Jan 13, 2025
1 parent 231f54f commit 792ce04
Showing 1 changed file with 6 additions and 6 deletions.
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

0 comments on commit 792ce04

Please sign in to comment.