Skip to content

Commit 8610872

Browse files
committed
add git workflow
1 parent 16774b5 commit 8610872

File tree

4 files changed

+109
-41
lines changed

4 files changed

+109
-41
lines changed

.github/workflows/release.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Create Build and Release
2+
3+
# Trigger the workflow when pushing a tag, e.g., v1.0.1
4+
on:
5+
push:
6+
tags:
7+
- 'v*' # This ensures the action is triggered on version tags like v1.0.0
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v3
16+
17+
- name: Set up Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: '22.x'
21+
22+
- name: Install dependencies
23+
run: npm install
24+
25+
- name: Build the project
26+
run: npm run build-release # Replace this with the command that builds your plugin
27+
28+
- name: Zip the build output as dist.zip
29+
run: zip -r dist.zip ./dist # Replace ./dist with the folder that contains the final build output
30+
31+
- name: Create GitHub Release
32+
id: create_release
33+
uses: actions/create-release@v1
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
with:
37+
tag_name: ${{ github.ref }}
38+
release_name: Release ${{ github.ref }}
39+
draft: false
40+
prerelease: false
41+
42+
- name: Upload dist.zip to GitHub Release
43+
uses: actions/upload-release-asset@v1
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
with:
47+
upload_url: ${{ steps.create_release.outputs.upload_url }}
48+
asset_path: ./dist.zip
49+
asset_name: dist.zip
50+
asset_content_type: application/zip
51+

package.json

Lines changed: 56 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,56 @@
1-
{
2-
"name": "acode-plugin",
3-
"version": "1.0.2",
4-
"description": "Template for Acode plugin",
5-
"main": "dist/main.js",
6-
"repository": "https://github.com/deadlyjack/acode-plugin.git",
7-
"author": "Ajit <me@ajitkumar.dev>",
8-
"license": "MIT",
9-
"dependencies": {
10-
"css-loader": "^7.1.2",
11-
"html-tag-js": "^1.1.41",
12-
"jsongraph-react": "^0.0.12",
13-
"postcss-loader": "^8.1.1",
14-
"react": "^18.3.1",
15-
"react-dom": "^18.3.1",
16-
"style-loader": "^4.0.0"
17-
},
18-
"devDependencies": {
19-
"@babel/cli": "^7.23.0",
20-
"@babel/core": "^7.25.2",
21-
"@babel/plugin-transform-runtime": "^7.23.2",
22-
"@babel/preset-env": "^7.25.4",
23-
"@babel/preset-react": "^7.24.7",
24-
"autoprefixer": "^10.4.20",
25-
"babel-loader": "^9.1.3",
26-
"jszip": "^3.10.1",
27-
"live-server": "^1.2.2",
28-
"postcss": "^8.4.45",
29-
"tailwindcss": "^3.4.10",
30-
"webpack": "^5.89.0",
31-
"webpack-cli": "^5.1.4"
32-
},
33-
"scripts": {
34-
"build": "webpack",
35-
"build-release": "webpack --mode production",
36-
"start-dev": "node .vscode/start-dev"
37-
},
38-
"browserslist": "cover 100%,not android < 5"
39-
}
1+
{
2+
"name": "@chaos-19/json-graph-acode", "version": "1.0.1",
3+
"description": "A JSON to Graph Visualizer plugin for Acode, built with React. This plugin enables users to visualize JSON data as an interactive graph for easy exploration of complex structures.",
4+
"main": "dist/main.js",
5+
"author": "kalkidan Getachew",
6+
"license": "MIT",
7+
"repository": {
8+
"type": "git",
9+
"url": "https://github.com/Chaos-19/Json_Graph_Acode.git"
10+
},
11+
"publishConfig": {
12+
"registry": "https://npm.pkg.github.com/"
13+
},
14+
"dependencies": {
15+
"css-loader": "^7.1.2",
16+
"html-tag-js": "^1.1.41",
17+
"jsongraph-react": "^0.0.12",
18+
"postcss-loader": "^8.1.1",
19+
"react": "^18.3.1",
20+
"react-dom": "^18.3.1",
21+
"style-loader": "^4.0.0"
22+
},
23+
"devDependencies": {
24+
"@babel/cli": "^7.23.0",
25+
"@babel/core": "^7.25.2",
26+
"@babel/plugin-transform-runtime": "^7.23.2",
27+
"@babel/preset-env": "^7.25.4",
28+
"@babel/preset-react": "^7.24.7",
29+
"autoprefixer": "^10.4.20",
30+
"babel-loader": "^9.1.3",
31+
"jszip": "^3.10.1",
32+
"live-server": "^1.2.2",
33+
"postcss": "^8.4.45",
34+
"tailwindcss": "^3.4.10",
35+
"webpack": "^5.89.0",
36+
"webpack-cli": "^5.1.4"
37+
},
38+
"scripts": {
39+
"build": "webpack",
40+
"build-release": "webpack --mode production",
41+
"start-dev": "node .vscode/start-dev"
42+
},
43+
"browserslist": "cover 100%,not android < 5",
44+
"keywords": [
45+
"Acode-plugin",
46+
"JSON-visualizer",
47+
"graph-visualizer",
48+
"jsongraph-react",
49+
"interactive-graph",
50+
"JSON-data",
51+
"data-visualization",
52+
"React",
53+
"developer-tools",
54+
"JSON-explorer"
55+
]
56+
}

plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
"author": {
1212
"name": "kalkidan Getachew",
1313
"email": "kalgetachew375@gmail.com",
14-
"github": ""
14+
"github": "https://github.com/Chaos-19"
1515
}
1616
}

src/components/Jsoncrack.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState, useEffect } from "react";
1+
import React, { useState, useEffect ,useRef} from "react";
22
import { JSONGraph as Graph } from "jsongraph-react";
33
import { fileExtensions } from "../constants";
44
const fs = acode.require("fsOperation");

0 commit comments

Comments
 (0)