Skip to content

Create npmpublish.yml #66

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
@@ -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}}
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]`

Expand All @@ -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]`

Expand All @@ -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]`

Expand All @@ -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]`

Expand All @@ -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]`

Expand Down Expand Up @@ -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)_
<!-- commandsstop -->

## Acknowledgement
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down