Skip to content

Commit 1237a8c

Browse files
authored
[MCTB-2008] Add release workflow (#2)
1 parent c502600 commit 1237a8c

File tree

4 files changed

+11240
-3
lines changed

4 files changed

+11240
-3
lines changed

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
release:
10+
name: Build and release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
16+
- name: Check version
17+
run: |
18+
VERSION=refs/tags/v
19+
VERSION+=$(cat package.json | jq -r .version)
20+
if [ $VERSION != '${{ github.ref }}' ]; then
21+
echo "Git tag doesn't match the version in package.json"
22+
exit 1
23+
fi
24+
25+
- name: Install Node
26+
uses: actions/setup-node@v1
27+
with:
28+
node-version: 14.x
29+
30+
- name: Install dependencies
31+
run: npm install
32+
33+
- name: Build
34+
run: npm run build
35+
36+
- name: Pack
37+
run: npm pack
38+
39+
- name: Release
40+
uses: softprops/action-gh-release@v1
41+
with:
42+
files: vue-json-viewer-*.tgz
43+
fail_on_unmatched_files: true

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,5 +150,4 @@ examples/dist/
150150
/vue-json-viewer.js
151151
/ssr.js
152152
/style.css
153-
yarn.lock
154-
package-lock.json
153+
yarn.lock

lib/types/json-array.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export default {
115115
forceExpand: this.forceExpand,
116116
showArrayIndex: this.showArrayIndex,
117117
showDoubleQuotes: this.showDoubleQuotes,
118-
path: `${this.path}.${key}`,
118+
path: `${this.path}[${key}]`,
119119
clickable: this.clickable,
120120
},
121121
on: {

0 commit comments

Comments
 (0)