Skip to content

Commit 5ffaaec

Browse files
committed
feat: add ci publish in npm
1 parent 8e7a63c commit 5ffaaec

File tree

3 files changed

+45
-1
lines changed

3 files changed

+45
-1
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Check Version
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
checkVersion:
9+
name: Check package version
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Check package version
14+
uses: technote-space/package-version-check-action@v1

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Publish Package
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
tags:
7+
- '*'
8+
9+
jobs:
10+
release:
11+
name: Publish Package
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
- name: Check package version
17+
uses: technote-space/package-version-check-action@v1
18+
with:
19+
COMMIT_DISABLED: 1
20+
21+
- name: Install Package dependencies
22+
run: yarn install
23+
- name: Build
24+
run: yarn build:minified
25+
- name: Publish
26+
run: |
27+
npm config set //registry.npmjs.org/:_authToken=$NPM_PUBLISH_TOKEN
28+
npm publish
29+
env:
30+
NPM_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "encrypt-storage",
3-
"version": "2.1.4",
3+
"version": "2.1.5",
44
"description": "Wrapper for encrypted localStorage and sessionStorage in browser",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)