From f800afb6c5106afdf5b56777b93270b527caa889 Mon Sep 17 00:00:00 2001 From: Ashish Patel Date: Sun, 9 Feb 2020 23:51:21 +0530 Subject: [PATCH 1/5] Create npmpublish.yml --- .github/workflows/npmpublish.yml | 45 ++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/npmpublish.yml diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml new file mode 100644 index 0000000..d1cc356 --- /dev/null +++ b/.github/workflows/npmpublish.yml @@ -0,0 +1,45 @@ +name: Node.js Package + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + - run: npm ci + - run: npm test + + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://registry.npmjs.org/ + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} + + publish-gpr: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://npm.pkg.github.com/ + scope: '@ashishpatel0720' + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} From b9df018516832ddc787f86fa2a05917625cd2340 Mon Sep 17 00:00:00 2001 From: Ashish Patel Date: Sun, 9 Feb 2020 23:57:21 +0530 Subject: [PATCH 2/5] Update npmpublish.yml --- .github/workflows/npmpublish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml index d1cc356..52f6f90 100644 --- a/.github/workflows/npmpublish.yml +++ b/.github/workflows/npmpublish.yml @@ -1,4 +1,4 @@ -name: Node.js Package +name: GithubPublish on: release: @@ -38,7 +38,7 @@ jobs: with: node-version: 12 registry-url: https://npm.pkg.github.com/ - scope: '@ashishpatel0720' + scope: '@codingtools/cdt' - run: npm ci - run: npm publish env: From 5c73b89ded5ba9bd2fca49e04b29d01ae2178699 Mon Sep 17 00:00:00 2001 From: Ashish Patel Date: Mon, 10 Feb 2020 00:19:14 +0530 Subject: [PATCH 3/5] Update npmpublish.yml --- .github/workflows/npmpublish.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml index 52f6f90..73c9ab3 100644 --- a/.github/workflows/npmpublish.yml +++ b/.github/workflows/npmpublish.yml @@ -1,8 +1,10 @@ name: GithubPublish on: - release: - types: [created] + push: + tags: + - v0.1.* + - v0.2.* jobs: build: From bb93a2262020842ac8d8cd13e400084599e50db4 Mon Sep 17 00:00:00 2001 From: ashish Date: Mon, 10 Feb 2020 00:24:31 +0530 Subject: [PATCH 4/5] 0.1.8 --- README.md | 14 +++++++------- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 0e71a30..722d128 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ $ npm install -g @codingtools/cdt $ cdt COMMAND running command... $ cdt (-v|--version|version) -@codingtools/cdt/0.1.7 darwin-x64 node-v12.9.0 +@codingtools/cdt/0.1.8 darwin-x64 node-v12.9.0 $ cdt --help [COMMAND] USAGE $ cdt COMMAND @@ -96,7 +96,7 @@ OPTIONS -t, --schemaType=schemaType schema type file path ``` -_See code: [src/commands/avro.ts](https://github.com/codingtools/cdt/blob/v0.1.7/src/commands/avro.ts)_ +_See code: [src/commands/avro.ts](https://github.com/codingtools/cdt/blob/v0.1.8/src/commands/avro.ts)_ ## `cdt bundlephobia [PACKAGE]` @@ -112,7 +112,7 @@ OPTIONS -p, --packages=packages packages for which cost is required, can pass more than one separated by space ``` -_See code: [src/commands/bundlephobia.ts](https://github.com/codingtools/cdt/blob/v0.1.7/src/commands/bundlephobia.ts)_ +_See code: [src/commands/bundlephobia.ts](https://github.com/codingtools/cdt/blob/v0.1.8/src/commands/bundlephobia.ts)_ ## `cdt crypto [STRING]` @@ -132,7 +132,7 @@ OPTIONS -s, --string=string string to be encrypted/decrypted ``` -_See code: [src/commands/crypto.ts](https://github.com/codingtools/cdt/blob/v0.1.7/src/commands/crypto.ts)_ +_See code: [src/commands/crypto.ts](https://github.com/codingtools/cdt/blob/v0.1.8/src/commands/crypto.ts)_ ## `cdt datetime [DATE]` @@ -150,7 +150,7 @@ OPTIONS -z, --timezone=timezone Timezone for Datetime parsing, default: Your timezone ``` -_See code: [src/commands/datetime.ts](https://github.com/codingtools/cdt/blob/v0.1.7/src/commands/datetime.ts)_ +_See code: [src/commands/datetime.ts](https://github.com/codingtools/cdt/blob/v0.1.8/src/commands/datetime.ts)_ ## `cdt hash [STRING]` @@ -168,7 +168,7 @@ OPTIONS -t, --type=type type of hash [SHA1(default), MD5, SHA256, SHA512, RMD160 or RIPEMD160] ``` -_See code: [src/commands/hash.ts](https://github.com/codingtools/cdt/blob/v0.1.7/src/commands/hash.ts)_ +_See code: [src/commands/hash.ts](https://github.com/codingtools/cdt/blob/v0.1.8/src/commands/hash.ts)_ ## `cdt help [COMMAND]` @@ -202,7 +202,7 @@ OPTIONS -t, --type=type type of file to be minified, it will try to find type with extension supported: JS, HTML/HTM, CSS ``` -_See code: [src/commands/minify.ts](https://github.com/codingtools/cdt/blob/v0.1.7/src/commands/minify.ts)_ +_See code: [src/commands/minify.ts](https://github.com/codingtools/cdt/blob/v0.1.8/src/commands/minify.ts)_ ## Acknowledgement diff --git a/package-lock.json b/package-lock.json index 1b64770..d44054c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@codingtools/cdt", - "version": "0.1.7", + "version": "0.1.8", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 1b41b24..1fa186a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@codingtools/cdt", "description": "CLI for Developers", - "version": "0.1.7", + "version": "0.1.8", "author": "Ashish Patel @ashishpatel0720", "bin": { "cdt": "./bin/run" From 5c6db703a5179ab1f6ea94f00445dc56dbc0734e Mon Sep 17 00:00:00 2001 From: ashish Date: Mon, 10 Feb 2020 00:31:26 +0530 Subject: [PATCH 5/5] [v0.1.8] : publisher CI configured Signed-off-by: ashish --- .github/workflows/npmpublish.yml | 28 ++++++++++++++-------------- README.md | 4 +++- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml index 73c9ab3..20173cd 100644 --- a/.github/workflows/npmpublish.yml +++ b/.github/workflows/npmpublish.yml @@ -31,17 +31,17 @@ jobs: env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} - publish-gpr: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 12 - registry-url: https://npm.pkg.github.com/ - scope: '@codingtools/cdt' - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} +# publish-gpr: +# needs: build +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v2 +# - uses: actions/setup-node@v1 +# with: +# node-version: 12 +# registry-url: https://npm.pkg.github.com/ +# scope: '@codingtools/cdt' +# - run: npm ci +# - run: npm publish +# env: +# NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/README.md b/README.md index 722d128..dfb6dfb 100644 --- a/README.md +++ b/README.md @@ -240,7 +240,9 @@ npm publish --access public ``` this will publish package to **npm** starting with updating README and publishing tarballs -### Creating Standalone Tarbalss +> Already a Github Action is there to publish on pushing a tag. + +### Creating Standalone Tarballs ```bash oclif-dev pack