Skip to content

Commit

Permalink
Use npm pack instead of manual tar
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Klotz committed Oct 15, 2023
1 parent 684a498 commit 2239522
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ jobs:
# make dist-wasm

- name: Build npm package
run: make BusytexAsync.npm.tar
run: make npm-package

- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: chown $(whoami) -R . && gh --version && gh release create build_wasm_${{github.sha}}_${{ github.run_id }}_${{ github.run_attempt }} -t "Wasm assets" build/wasm/busytex.js build/wasm/busytex.wasm BusytexAsync.npm.tar
run: chown $(whoami) -R . && gh --version && gh release create build_wasm_${{github.sha}}_${{ github.run_id }}_${{ github.run_attempt }} -t "Wasm assets" build/wasm/busytex.js build/wasm/busytex.wasm busytex-async-*.tgz
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ download-native:
#$(foreach binname,$(BUSYTEX_WEB2CBIN), echo 'echo $(binname) $$@ 1>&2; $(ROOT)/build/native/texlive/texk/web2c/busyweb2c $(binname) $$@' > build/native/texlive/texk/web2c/web2c/$(binname);)
chmod +x $(addprefix build/native/texlive/texk/web2c/, $(BUSYTEX_TEXBIN)) $(addprefix build/native/texlive/texk/web2c/web2c/, $(BUSYTEX_WEB2CBIN))

BusytexAsync.npm.tar:
npm-package:
npm install
npm run build
tar -cf BusytexAsync.npm.tar $$(find build-js -type f) $$(find typescript -type f) build/wasm/busytex.js build/wasm/busytex.wasm package.json package-lock.json tsconfig.json
npm pack
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,12 @@
"mocha": "^10.2.0",
"pdf-parse": "^1.1.1",
"typescript": "^5.2.2"
}
},
"files": [
"typescript/**/*",
"build-js/**/*",
"build/wasm/busytex.js",
"build/wasm/busytex.wasm",
"tsconfig.json"
]
}

0 comments on commit 2239522

Please sign in to comment.