Skip to content

Added Notice, About Menu, Modified Workflow and Removed Scene Creatio… #8

Added Notice, About Menu, Modified Workflow and Removed Scene Creatio…

Added Notice, About Menu, Modified Workflow and Removed Scene Creatio… #8

Workflow file for this run

name: Publish UPM Package
on:
push:
tags:
- "v*.*.*"
jobs:
update-and-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Prepare and Update Version
id: prep
run: |
# 1. Strip 'v' from tag (v1.0.5 -> 1.0.5) for Unity compatibility
RAW_TAG=${{ github.ref_name }}
CLEAN_TAG=$(echo $RAW_TAG | sed 's/^v//')
echo "tag=$CLEAN_TAG" >> $GITHUB_OUTPUT
# 2. Update package.json
if [ -f package.json ]; then
sed -i "s/\"version\": \".*\"/\"version\": \"$CLEAN_TAG\"/" package.json
else
echo "package.json not found!" && exit 1
fi
shell: bash
- name: Commit and Push to Main
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add package.json
# [optional] also add NOTICE or LICENSE if they were changed
git commit -m "chore: bump version to ${{ steps.prep.outputs.tag }}"
# Push the local 'package.json' update back to the main branch
git push origin HEAD:main
shell: bash
- name: Create .tgz Artifact
run: |
PACKAGE_NAME="com.cjhawk.graphnodeeditor-${{ steps.prep.outputs.tag }}.tgz"
tar -czf "$PACKAGE_NAME" --exclude='.git*' .
echo "PACKAGE_PATH=$PACKAGE_NAME" >> $GITHUB_ENV
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: "Release ${{ github.ref_name }}"
body: |
## Node Graph Editor ${{ steps.prep.outputs.tag }}
The `package.json` has been automatically updated to version `${{ steps.prep.outputs.tag }}`.
### Installation
- **Git URL:** `https://github.com/Selva1910/NodeGraphEditor.git#${{ github.ref_name }}`
- **Tarball:** Download the `.tgz` below for manual installation.
files: ${{ env.PACKAGE_PATH }}