From e906d80ccffa982f4cc9fcd705b406faa5f6680f Mon Sep 17 00:00:00 2001 From: jin Date: Thu, 14 Dec 2023 14:54:04 +0300 Subject: [PATCH] $mol_build: mam auto publish --- .github/workflows/mam.yml | 29 +++++++++++++++++++++++++++++ build/build.node.ts | 2 -- build/package.json | 37 +++++++++++++------------------------ 3 files changed, 42 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/mam.yml diff --git a/.github/workflows/mam.yml b/.github/workflows/mam.yml new file mode 100644 index 00000000000..21d5be88a17 --- /dev/null +++ b/.github/workflows/mam.yml @@ -0,0 +1,29 @@ +name: mam + +on: + workflow_dispatch: + push: + branches: + - master + paths: + - '.github/workflows/mam.yml' + - 'build/**' + pull_request: + schedule: + - cron: "0 7 * * *" + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: hyoo-ru/mam_build@master2 + with: + package: mol + modules: build + - uses: JS-DevTools/npm-publish@v1 + if: ${{ github.ref == 'refs/heads/master' }} + with: + token: ${{ secrets.NPM_AUTH_TOKEN }} + package: ./mol/build/-/package.json diff --git a/build/build.node.ts b/build/build.node.ts index 34c62978ee1..4eb067024e8 100644 --- a/build/build.node.ts +++ b/build/build.node.ts @@ -1277,8 +1277,6 @@ namespace $ { json.version = version.join( '.' ) - json.dependencies = {} - for( let dep of this.nodeDeps({ path , exclude }) ) { if( require('module').builtinModules.includes(dep) ) continue json.dependencies[ dep ] = `*` diff --git a/build/package.json b/build/package.json index 9e154de96e3..2c8d6016fd7 100644 --- a/build/package.json +++ b/build/package.json @@ -1,27 +1,16 @@ { - "name": "mam", - "version": "1.11.0", - "exports": { - "node": { - "import": "./node.mjs", - "default": "./node.js" + "name": "mam", + "version": "1.11.0", + "bin": { + "mam": "./bin/mam" }, - "types": "./web.d.ts", - "import": "./web.mjs", - "default": "./web.js" - }, - "main": "./node.js", - "module": "./node.mjs", - "browser": "./web.js", - "types": "./web.d.ts", - "bin": { - "mam": "./bin/mam" - }, - "dependencies": { - "@types/compression": "*", - "@types/express": "*", - "@types/node": "*", - "@types/serve-index": "*", - "@types/ws": "*" - } + "dependencies": { + "@types/node": "*", + "@types/express": "*", + "@types/compression": "*", + "@types/cors": "*", + "@types/body-parser": "*", + "@types/serve-index": "*", + "@types/ws": "*" + } }