From 034698781597842fa4f1f072402976345e050d74 Mon Sep 17 00:00:00 2001 From: YadBro Date: Thu, 28 Apr 2022 21:18:14 +0700 Subject: [PATCH] registry --- .github/workflows/release-package.yml | 33 +++++++++++++++++++++++++++ .npmrc | 1 + README.md | 2 +- package-lock.json | 22 +++++++++--------- package.json | 7 ++++-- 5 files changed, 51 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/release-package.yml create mode 100644 .npmrc diff --git a/.github/workflows/release-package.yml b/.github/workflows/release-package.yml new file mode 100644 index 0000000..6cb8903 --- /dev/null +++ b/.github/workflows/release-package.yml @@ -0,0 +1,33 @@ +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: 12 + - run: npm ci + - run: npm test + + publish-gpr: + needs: build + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 12 + registry-url: https://npm.pkg.github.com/ + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..02395d4 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +@YadBro:registry=https://npm.pkg.github.com \ No newline at end of file diff --git a/README.md b/README.md index 0468b07..ef03b0a 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This is a package module javascript for calculate the distance between two point Use npm, make sure your npm is up to date. ``` -npm install calculating-date --save +npm install calculating-date ``` ## Usage diff --git a/package-lock.json b/package-lock.json index d2ac99b..9186a82 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,25 +1,25 @@ { "name": "calculating-date", - "version": "1.0.8", + "version": "1.1.9", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "calculating-date", - "version": "1.0.8", + "version": "1.1.9", "license": "MIT", "dependencies": { - "calculating-date": "^1.0.8", + "calculating-date": "^1.1.9", "moment": "^2.29.3" }, "devDependencies": {} }, "node_modules/calculating-date": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/calculating-date/-/calculating-date-1.0.8.tgz", - "integrity": "sha512-ejBmJszM+3E7x9RRXnUees/yHyJmfE3sEzXqhzlPkXz4GuRXB0JitL4oZ8YbzdbPs5OdcW2cSmNu8P0Gc1ixaA==", + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/calculating-date/-/calculating-date-1.1.9.tgz", + "integrity": "sha512-PqGc6E9ytOV4wEE4zWtxNKI0nrRQlCBdUzRiyHb2sgD6nPVVQy4gp9CJT8UXb2T1WRPNqAt0eAO47WH+2qSn1A==", "dependencies": { - "calculating-date": "^1.0.7", + "calculating-date": "^1.0.8", "moment": "^2.29.3" } }, @@ -34,11 +34,11 @@ }, "dependencies": { "calculating-date": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/calculating-date/-/calculating-date-1.0.8.tgz", - "integrity": "sha512-ejBmJszM+3E7x9RRXnUees/yHyJmfE3sEzXqhzlPkXz4GuRXB0JitL4oZ8YbzdbPs5OdcW2cSmNu8P0Gc1ixaA==", + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/calculating-date/-/calculating-date-1.1.9.tgz", + "integrity": "sha512-PqGc6E9ytOV4wEE4zWtxNKI0nrRQlCBdUzRiyHb2sgD6nPVVQy4gp9CJT8UXb2T1WRPNqAt0eAO47WH+2qSn1A==", "requires": { - "calculating-date": "^1.0.7", + "calculating-date": "^1.0.8", "moment": "^2.29.3" } }, diff --git a/package.json b/package.json index 31dd8b6..e4932f1 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "type": "module", "name": "calculating-date", - "version": "1.1.8", + "version": "1.1.9", "description": "This is for calculate date from startDate and endDate", "main": "mymodule.mjs", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": " \"Error: no test specified\" && exit 0" }, "author": "Yadi Apriyadi", "license": "MIT", @@ -13,6 +13,9 @@ "calculating-date": "^1.0.8", "moment": "^2.29.3" }, + "publishConfig": { + "@YadBro:registry": "https://npm.pkg.github.com" + }, "repository": { "type": "git", "url": "git+https://github.com/YadBro/Calculating-Date.git"