Skip to content

Commit d357eb9

Browse files
committed
Added Notice, About Menu, Modified Workflow and Removed Scene Creation Menu till the feature finish.
1 parent 9f70b85 commit d357eb9

8 files changed

Lines changed: 110 additions & 38 deletions

File tree

.github/workflows/PublicPackage.yml

Lines changed: 48 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,67 @@ name: Publish UPM Package
33
on:
44
push:
55
tags:
6-
- "v*.*.*" # Trigger on semantic version tags
6+
- "v*.*.*"
77

88
jobs:
9-
update-version:
9+
update-and-release:
1010
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
1113

1214
steps:
13-
# Step 1: Check out the repository
1415
- name: Check out code
15-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
1619

17-
# Step 2: Extract version tag and update package.json
18-
- name: Update package.json version
20+
- name: Prepare and Update Version
21+
id: prep
1922
run: |
20-
echo "GitHub Ref: $GITHUB_REF"
21-
TAG=$(echo $GITHUB_REF | sed 's|refs/tags/||')
22-
echo "Extracted TAG: $TAG"
23+
# 1. Strip 'v' from tag (v1.0.5 -> 1.0.5) for Unity compatibility
24+
RAW_TAG=${{ github.ref_name }}
25+
CLEAN_TAG=$(echo $RAW_TAG | sed 's/^v//')
26+
echo "tag=$CLEAN_TAG" >> $GITHUB_OUTPUT
27+
28+
# 2. Update package.json
2329
if [ -f package.json ]; then
24-
sed -i "s/\"version\": \".*\"/\"version\": \"$TAG\"/" package.json
25-
cat package.json
26-
27-
# Switch to the branch before committing
28-
DEFAULT_BRANCH=$(git remote show origin | grep 'HEAD branch' | cut -d' ' -f5)
29-
echo "Default branch: $DEFAULT_BRANCH"
30-
git checkout $DEFAULT_BRANCH
31-
32-
git config user.name "github-actions[bot]"
33-
git config user.email "github-actions[bot]@users.noreply.github.com"
34-
git add package.json
35-
git commit -m "Update package version to $TAG"
36-
git push origin $DEFAULT_BRANCH
30+
sed -i "s/\"version\": \".*\"/\"version\": \"$CLEAN_TAG\"/" package.json
3731
else
38-
echo "Error: package.json not found at the root"
39-
exit 1
32+
echo "package.json not found!" && exit 1
4033
fi
4134
shell: bash
4235

43-
# Step 3: Optional - Create a GitHub release
36+
- name: Commit and Push to Main
37+
run: |
38+
git config user.name "github-actions[bot]"
39+
git config user.email "github-actions[bot]@users.noreply.github.com"
40+
41+
git add package.json
42+
# [optional] also add NOTICE or LICENSE if they were changed
43+
44+
git commit -m "chore: bump version to ${{ steps.prep.outputs.tag }}"
45+
46+
# Push the local 'package.json' update back to the main branch
47+
git push origin HEAD:main
48+
shell: bash
49+
50+
- name: Create .tgz Artifact
51+
run: |
52+
PACKAGE_NAME="com.cjhawk.graphnodeeditor-${{ steps.prep.outputs.tag }}.tgz"
53+
tar -czf "$PACKAGE_NAME" --exclude='.git*' .
54+
echo "PACKAGE_PATH=$PACKAGE_NAME" >> $GITHUB_ENV
55+
4456
- name: Create GitHub Release
45-
uses: actions/create-release@v1
57+
uses: softprops/action-gh-release@v2
4658
with:
4759
tag_name: ${{ github.ref_name }}
48-
release_name: "Release ${{ github.ref_name }}"
49-
body: "Automatic release of Unity package version ${{ github.ref_name }}."
50-
draft: false
51-
prerelease: false
60+
name: "Release ${{ github.ref_name }}"
61+
body: |
62+
## Node Graph Editor ${{ steps.prep.outputs.tag }}
63+
64+
The `package.json` has been automatically updated to version `${{ steps.prep.outputs.tag }}`.
65+
66+
### Installation
67+
- **Git URL:** `https://github.com/Selva1910/NodeGraphEditor.git#${{ github.ref_name }}`
68+
- **Tarball:** Download the `.tgz` below for manual installation.
69+
files: ${{ env.PACKAGE_PATH }}

Editor/MenuManager.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,22 @@ namespace NodeGraph.Editor
66
public class MenuManager
77
{
88

9-
private const string menuName = "NodeGraph/New Sequence";
9+
private const string mainMenu = "Node Graph";
1010

11-
[MenuItem(menuName)]
11+
private const string newSequence = "New Sequence";
12+
private const string about = "About";
13+
14+
//[MenuItem(mainMenu + "/" + newSequence)]
1215
public static void NewSequence()
1316
{
1417
EditorWindow.GetWindow<SceneCreation>().ShowModal();
1518
}
19+
20+
[MenuItem(mainMenu + "/" + about)]
21+
public static void ShowAbout()
22+
{
23+
NodeGraphEditorAbout.ShowWindow();
24+
}
25+
1626
}
1727
}

Editor/NodeGraphEditorAbout.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using UnityEngine;
2+
using UnityEditor;
3+
4+
namespace NodeGraph.Editor
5+
{
6+
7+
public class NodeGraphEditorAbout : EditorWindow {
8+
9+
public static void ShowWindow() {
10+
EditorUtility.DisplayDialog("About Node Graph Editor",
11+
"Developed by Selvaraj Balakrishnan\n" +
12+
"Version: 1.0.5\n\n" +
13+
"This software is licensed under AGPLv3. " +
14+
"Modifications must remain open source and credit the original author.", "OK");
15+
}
16+
}
17+
}

Editor/NodeGraphEditorAbout.cs.meta

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/SceneCreation/SceneCreation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace NodeGraph.Editor
66
{
77
public class SceneCreation : EditorWindow
88
{
9-
[MenuItem("Window/NodeGraph/Scene Creation")]
9+
1010
public static void ShowWindow()
1111
{
1212
SceneCreation wnd = GetWindow<SceneCreation>();

NOTICE

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Node Graph Editor (com.cjhawk.graphnodeeditor)
2+
Copyright (C) 2026 Selvaraj Balakrishnan
3+
4+
LEGAL NOTICE (AGPLv3 Section 7):
5+
1. ATTRIBUTION: Any modified version of this Software must prominently
6+
display the original author's name ("Selvaraj Balakrishnan") and
7+
the original repository link (https://github.com/Selva1910/NodeGraphEditor)
8+
within the Unity Editor UI (e.g., in a "Credits" or "About" window).
9+
10+
2. SOURCE INTEGRITY: All modifications submitted or redistributed are
11+
intended for the enhancement of the original Node Graph Editor
12+
architecture. Original copyright headers in source files must
13+
remain intact.

NOTICE.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,30 @@
22
"name": "com.cjhawk.graphnodeeditor",
33
"version": "1.0.5",
44
"displayName": "Node Graph Editor",
5-
"description": "A visual node graph editor for Unity, built from scratch using the GraphView API — designed to power event-driven, flow-based gameplay logic through a ScriptableObject Architecture.",
5+
"description": "A visual node graph editor for Unity, built from scratch using the GraphView API — designed to power event-driven, flow-based gameplay logic through a ScriptableObject architecture.",
66
"unity": "2022.3",
77
"unityRelease": "21f1",
8-
"documentationUrl": "",
8+
"documentationUrl": "https://github.com/Selva1910/NodeGraphEditor#readme",
99
"changelogUrl": "https://github.com/Selva1910/NodeGraphEditor/blob/main/CHANGELOG.md",
1010
"licensesUrl": "https://github.com/Selva1910/NodeGraphEditor/blob/main/LICENSE",
1111
"dependencies": {},
1212
"keywords": [
1313
"grapheditor",
1414
"graphnodeeditor",
15-
"visualgrapheditor"
15+
"NodeGraphEditor",
16+
"visualgrapheditor",
17+
"unity",
18+
"graphview",
19+
"scriptableobject"
1620
],
1721
"author": {
18-
"name": "SelvarajBalakrishnan",
22+
"name": "Selvaraj Balakrishnan",
1923
"email": "bselva1910@gmail.com",
2024
"url": "https://selva1910.github.io/"
2125
},
2226
"repository": {
2327
"type": "git",
2428
"url": "https://github.com/Selva1910/NodeGraphEditor.git"
25-
}
29+
},
30+
"license": "AGPL-3.0-only"
2631
}

0 commit comments

Comments
 (0)