diff --git a/.github/workflows/publish-casper-client-sdk.yml b/.github/workflows/publish-casper-client-sdk.yml index ac3f2eb9b..3354741f9 100644 --- a/.github/workflows/publish-casper-client-sdk.yml +++ b/.github/workflows/publish-casper-client-sdk.yml @@ -32,12 +32,9 @@ jobs: - name: Get latest release version number id: get_version uses: battila7/get-version-action@v2 - - run: npm run build:umd - env: - INPUT_TOKEN: '' - - run: mv dist/lib.umd.js dist/casper-client-sdk.v${{ steps.get_version.outputs.version }}.umd.js + - run: cp dist/lib.js casper-client-sdk.v${{ steps.get_version.outputs.version }}.js - uses: meeDamian/github-release@2.0 with: token: ${{ secrets.GITHUB_TOKEN }} - files: dist/casper-client-sdk.v${{ steps.get_version.outputs.version }}.umd.js + files: casper-client-sdk.v${{ steps.get_version.outputs.version }}.js allow_override: true diff --git a/package.json b/package.json index 3d7d55358..36c9f6e74 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "casper-client-sdk", - "version": "1.0.30", + "version": "1.0.31", "license": "Apache 2.0", "description": "SDK to interact with the Casper blockchain", "main": "dist/lib.node.js", @@ -11,7 +11,6 @@ "lint": "eslint src/ --fix", "prebuild": "npm run clean && npm run lint", "build": "webpack --config webpack.config.js", - "build:umd": "webpack --config webpack.config.umd.js", "clean": "rm -rf ./dist", "~build": "tsc --watch", "test": "TS_NODE_FILES=true mocha -r ts-node/register test/**/*.test.ts", diff --git a/webpack.config.js b/webpack.config.js index 3456be5ca..26b8c5089 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -23,7 +23,8 @@ const serverConfig = { target: 'node', output: { path: path.resolve(__dirname, 'dist'), - filename: 'lib.node.js' + filename: 'lib.node.js', + libraryTarget: 'umd' }, externals: [nodeExternals()] // in order to ignore all modules in node_modules folder }; @@ -47,7 +48,8 @@ const clientConfig = { ], output: { path: path.resolve(__dirname, 'dist'), - filename: 'lib.js' + filename: 'lib.js', + libraryTarget: 'umd' } }; diff --git a/webpack.config.umd.js b/webpack.config.umd.js deleted file mode 100644 index 7c9a7404b..000000000 --- a/webpack.config.umd.js +++ /dev/null @@ -1,12 +0,0 @@ -const path = require('path'); -const config = require('./webpack.config'); - -module.exports = { - ...config[1], - output: { - filename: 'lib.umd.js', - path: path.resolve(__dirname, 'dist'), - libraryTarget: 'umd', - globalObject: 'this' - } -};