From f48b26d0401f2f8991b61090ebc2eb2d99a32edc Mon Sep 17 00:00:00 2001 From: achhayapathak Date: Sun, 23 Jun 2024 07:46:23 +0530 Subject: [PATCH] v1.3.0: Added GH workflow to automate publishing of the package --- .github/workflows/publish.yml | 39 +++++++++++++++++++++++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..d1911eb --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,39 @@ +name: Publish-to-npm + +on: + pull_request: + branches: [main] + types: + - closed + + push: + branches: [main] + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 20 + + - name: Install Dependencies + run: npm ci + + - name: Create a build + run: npm link + + - name: Run the server + run: tt-host + + - name: Run the client + run: tt-join + + - name: Publish to NPM + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index eb5fc5f..a339a77 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "termtalk", - "version": "1.0.0", + "version": "1.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "termtalk", - "version": "1.0.0", + "version": "1.3.0", "license": "MIT", "dependencies": { "socket.io": "^4.7.5", diff --git a/package.json b/package.json index 7d2c691..232ff3d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "termtalk", - "version": "1.2.0", + "version": "1.3.0", "description": "Npm package to securely chat with your friend through your CLI.", "scripts": { "host": "node ./server/server.js",