Skip to content

Commit

Permalink
Added a github workflow to publish the package
Browse files Browse the repository at this point in the history
  • Loading branch information
JackHumphries9 committed Jan 3, 2023
1 parent 4370d2e commit 6e5581d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/publish-to-npm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Publish Package to npmjs
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion src/jwtDecode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const jwtDecode = (token: string, options?: DecodeOptions) => {
jwt = JSON.parse(decoded);
}

console.log(chalk.blue("Your Decoded JWT:") + "\n");
console.log(chalk.green("Your Decoded JWT:") + "\n");

const header = JSON.parse(
Buffer.from(token.split(".")[0] + "==", "base64url").toString()
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const PKG_VERSION = "1.0.0";export const PKG_DESCRIPTION = "A command line tool to decode, sign and verify JWT Tokens";
export const PKG_VERSION = "1.0.0";export const PKG_DESCRIPTION = "A command line tool to decode, sign and verify JWTs";

0 comments on commit 6e5581d

Please sign in to comment.