Skip to content

Commit c027ab8

Browse files
authored
Merge pull request #66 from codingtools/ci/npm-publish
Create npmpublish.yml
2 parents b14f7ea + 5c6db70 commit c027ab8

File tree

4 files changed

+59
-10
lines changed

4 files changed

+59
-10
lines changed

.github/workflows/npmpublish.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: GithubPublish
2+
3+
on:
4+
push:
5+
tags:
6+
- v0.1.*
7+
- v0.2.*
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-node@v1
15+
with:
16+
node-version: 12
17+
- run: npm ci
18+
- run: npm test
19+
20+
publish-npm:
21+
needs: build
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v2
25+
- uses: actions/setup-node@v1
26+
with:
27+
node-version: 12
28+
registry-url: https://registry.npmjs.org/
29+
- run: npm ci
30+
- run: npm publish
31+
env:
32+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
33+
34+
# publish-gpr:
35+
# needs: build
36+
# runs-on: ubuntu-latest
37+
# steps:
38+
# - uses: actions/checkout@v2
39+
# - uses: actions/setup-node@v1
40+
# with:
41+
# node-version: 12
42+
# registry-url: https://npm.pkg.github.com/
43+
# scope: '@codingtools/cdt'
44+
# - run: npm ci
45+
# - run: npm publish
46+
# env:
47+
# NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ $ npm install -g @codingtools/cdt
4040
$ cdt COMMAND
4141
running command...
4242
$ cdt (-v|--version|version)
43-
@codingtools/cdt/0.1.7 darwin-x64 node-v12.9.0
43+
@codingtools/cdt/0.1.8 darwin-x64 node-v12.9.0
4444
$ cdt --help [COMMAND]
4545
USAGE
4646
$ cdt COMMAND
@@ -96,7 +96,7 @@ OPTIONS
9696
-t, --schemaType=schemaType schema type file path
9797
```
9898

99-
_See code: [src/commands/avro.ts](https://github.com/codingtools/cdt/blob/v0.1.7/src/commands/avro.ts)_
99+
_See code: [src/commands/avro.ts](https://github.com/codingtools/cdt/blob/v0.1.8/src/commands/avro.ts)_
100100

101101
## `cdt bundlephobia [PACKAGE]`
102102

@@ -112,7 +112,7 @@ OPTIONS
112112
-p, --packages=packages packages for which cost is required, can pass more than one separated by space
113113
```
114114

115-
_See code: [src/commands/bundlephobia.ts](https://github.com/codingtools/cdt/blob/v0.1.7/src/commands/bundlephobia.ts)_
115+
_See code: [src/commands/bundlephobia.ts](https://github.com/codingtools/cdt/blob/v0.1.8/src/commands/bundlephobia.ts)_
116116

117117
## `cdt crypto [STRING]`
118118

@@ -132,7 +132,7 @@ OPTIONS
132132
-s, --string=string string to be encrypted/decrypted
133133
```
134134

135-
_See code: [src/commands/crypto.ts](https://github.com/codingtools/cdt/blob/v0.1.7/src/commands/crypto.ts)_
135+
_See code: [src/commands/crypto.ts](https://github.com/codingtools/cdt/blob/v0.1.8/src/commands/crypto.ts)_
136136

137137
## `cdt datetime [DATE]`
138138

@@ -150,7 +150,7 @@ OPTIONS
150150
-z, --timezone=timezone Timezone for Datetime parsing, default: Your timezone
151151
```
152152

153-
_See code: [src/commands/datetime.ts](https://github.com/codingtools/cdt/blob/v0.1.7/src/commands/datetime.ts)_
153+
_See code: [src/commands/datetime.ts](https://github.com/codingtools/cdt/blob/v0.1.8/src/commands/datetime.ts)_
154154

155155
## `cdt hash [STRING]`
156156

@@ -168,7 +168,7 @@ OPTIONS
168168
-t, --type=type type of hash [SHA1(default), MD5, SHA256, SHA512, RMD160 or RIPEMD160]
169169
```
170170

171-
_See code: [src/commands/hash.ts](https://github.com/codingtools/cdt/blob/v0.1.7/src/commands/hash.ts)_
171+
_See code: [src/commands/hash.ts](https://github.com/codingtools/cdt/blob/v0.1.8/src/commands/hash.ts)_
172172

173173
## `cdt help [COMMAND]`
174174

@@ -202,7 +202,7 @@ OPTIONS
202202
-t, --type=type type of file to be minified, it will try to find type with extension supported: JS, HTML/HTM, CSS
203203
```
204204

205-
_See code: [src/commands/minify.ts](https://github.com/codingtools/cdt/blob/v0.1.7/src/commands/minify.ts)_
205+
_See code: [src/commands/minify.ts](https://github.com/codingtools/cdt/blob/v0.1.8/src/commands/minify.ts)_
206206
<!-- commandsstop -->
207207

208208
## Acknowledgement
@@ -240,7 +240,9 @@ npm publish --access public
240240
```
241241
this will publish package to **npm** starting with updating README and publishing tarballs
242242

243-
### Creating Standalone Tarbalss
243+
> Already a Github Action is there to publish on pushing a tag.
244+
245+
### Creating Standalone Tarballs
244246

245247
```bash
246248
oclif-dev pack

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@codingtools/cdt",
33
"description": "CLI for Developers",
4-
"version": "0.1.7",
4+
"version": "0.1.8",
55
"author": "Ashish Patel @ashishpatel0720",
66
"bin": {
77
"cdt": "./bin/run"

0 commit comments

Comments
 (0)