diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml new file mode 100644 index 0000000..20173cd --- /dev/null +++ b/.github/workflows/npmpublish.yml @@ -0,0 +1,47 @@ +name: GithubPublish + +on: + push: + tags: + - v0.1.* + - v0.2.* + +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: '@codingtools/cdt' +# - run: npm ci +# - run: npm publish +# env: +# NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/README.md b/README.md index 0e71a30..dfb6dfb 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 @@ -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 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"