From 4dfcd5cb8f01d004e259ea66a88d3efccf02eb82 Mon Sep 17 00:00:00 2001 From: mohammadaeid7 <82334411+mohammadaeid7@users.noreply.github.com> Date: Tue, 2 May 2023 00:13:41 +0300 Subject: [PATCH 1/2] Add files via upload --- truffle-config.js | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/truffle-config.js b/truffle-config.js index ae6e17b..dfcd480 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -1,6 +1,3 @@ -require('dotenv').config(); - - const mnemonic = process.env.MNEMONIC; const HDWalletProvider = require("@truffle/hdwallet-provider"); @@ -9,7 +6,7 @@ module.exports = { networks: { development: { host: "127.0.0.1", - port: 8545, + port: 8545, network_id: "*" // Match any network id }, polygon: { @@ -25,17 +22,4 @@ module.exports = { confirmations: 2, timeoutBlocks: 200, skipDryRun: true - } - - }, - contracts_directory: './src/contracts/', - contracts_build_directory: './src/abis/', - compilers: { - solc: { - optimizer: { - enabled: true, - runs: 200 - }, - } - } -} + } \ No newline at end of file From de119c1d4621e7edbfec71a8155e10e6fd774051 Mon Sep 17 00:00:00 2001 From: mohammadaeid7 <82334411+mohammadaeid7@users.noreply.github.com> Date: Tue, 2 May 2023 03:26:01 +0300 Subject: [PATCH 2/2] Create npm-publish.yml --- .github/workflows/npm-publish.yml | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..6cdebaf --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,33 @@ +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages + +name: Node.js Package + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - run: npm ci + - run: npm test + + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + registry-url: https://registry.npmjs.org/ + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}}