Skip to content

Commit

Permalink
[Fix #2] Exclude linuxmusl binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
pH200 committed Jan 4, 2024
1 parent 29aa370 commit c81ddba
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ jobs:
run: npm i -g esbuild@0.18.20

- name: Install sharp - arm64
run: npm i --save-exact --os=linux --cpu=arm64 sharp
run: npm i --save-exact --os=linux --cpu=arm64 --libc=glibc sharp
- name: Remove musl-based binary # @npm/cli#6914
run: rm -rf node_modules/@img/*-linuxmusl*
- name: Get sharp version
id: version
uses: notiz-dev/github-action-json-property@release
Expand All @@ -49,7 +51,9 @@ jobs:
run: rm -rf nodejs node_modules # keep package.json for keeping the version

- name: Install sharp - x64
run: npm i --save-exact --os=linux --cpu=x64 sharp
run: npm i --save-exact --os=linux --cpu=x64 --libc=glibc sharp
- name: Remove musl-based binary # @npm/cli#6914
run: rm -rf node_modules/@img/*-linuxmusl*
- name: esbuild - x64
run: esbuild --bundle ./node_modules/sharp/ --outfile=index.js --minify --format=cjs --platform=node
- name: Zip - x64
Expand All @@ -66,8 +70,10 @@ jobs:

- name: Install sharp - all
run: |
npm i --os=linux --cpu=x64 sharp
npm i --os=linux --cpu=arm64 sharp
npm i --os=linux --cpu=x64 --libc=glibc sharp
npm i --os=linux --cpu=arm64 --libc=glibc sharp
- name: Remove musl-based binary # @npm/cli#6914
run: rm -rf node_modules/@img/*-linuxmusl*
- name: esbuild - all
run: esbuild --bundle ./node_modules/sharp/ --outfile=index.js --minify --format=cjs --platform=node
- name: Zip - all
Expand Down

0 comments on commit c81ddba

Please sign in to comment.