Skip to content
Merged

Upm #22

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,33 @@ jobs:
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "VERSION=$VERSION" >> $GITHUB_ENV

- name: Update package.json version
run: |
VERSION="${{ steps.validate-version.outputs.version }}"
# Update version in UPM package manifest so it matches the release tag
if [ -f Packages/gg.stash.unity/package.json ]; then
sed -i.bak "s/\"version\": \"[^\"]*\"/\"version\": \"$VERSION\"/" Packages/gg.stash.unity/package.json
rm -f Packages/gg.stash.unity/package.json.bak
cat Packages/gg.stash.unity/package.json | grep '"version"'
fi

- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Create git tag
- name: Commit package version and create tag
run: |
git tag -a "v${{ steps.validate-version.outputs.version }}" -m "Release v${{ steps.validate-version.outputs.version }}"
git push origin "v${{ steps.validate-version.outputs.version }}"
VERSION="${{ steps.validate-version.outputs.version }}"
if git diff --quiet Packages/gg.stash.unity/package.json 2>/dev/null; then
echo "No package.json change (version already $VERSION)"
else
git add Packages/gg.stash.unity/package.json
git commit -m "chore: set package version to $VERSION"
git push origin HEAD
fi
git tag -a "v$VERSION" -m "Release v$VERSION"
git push origin "v$VERSION"

- name: Format release body
id: format-body
Expand Down
49 changes: 24 additions & 25 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,40 +1,30 @@
# This .gitignore file should be placed at the root of your Unity project directory
#
# Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore
#
# This .gitignore ensures only source, config, and package assets are committed.
# Unity: https://github.com/github/gitignore/blob/main/Unity.gitignore

# Unity generated / cache (never commit)
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
/[Uu]ser[Ss]ettings/

# MemoryCaptures can get excessive in size.
# They also could contain extremely sensitive data
/[Mm]emoryCaptures/

# Recordings can get excessive in size
/[Rr]ecordings/

# Uncomment this line if you wish to ignore the asset store tools plugin
# /[Aa]ssets/AssetStoreTools*

# Autogenerated Jetbrains Rider plugin
/[Aa]ssets/Plugins/Editor/JetBrains*

# Visual Studio cache directory
# IDEs and editors (local only)
.vscode/
.idea/
.consulo/

# Gradle cache directory
# Gradle
.gradle/

# Idea IDE
.idea/

# Autogenerated VS/MD/Consulo solution and project files
# Autogenerated solution/project files (Unity regenerates these)
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
Expand All @@ -50,30 +40,39 @@ ExportedObj/
*.opendb
*.VC.db

# Unity3D generated meta files
# Unity generated meta for build artifacts
*.pidb.meta
*.pdb.meta
*.mdb.meta

# Unity3D generated file on crash reports
# Crash reports
sysinfo.txt

# Builds
# Build outputs (do not commit)
*.apk
*.aab
*.unitypackage
*.app

# OS junk
*.DS_Store
.DS_Store
Thumbs.db
ehthumbs.db

# Crashlytics generated file
# Crashlytics
crashlytics-build.properties

# Packed Addressables
# Addressables
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*

# Temporary auto-generated Android Assets
# StreamingAssets auto-generated
/[Aa]ssets/[Ss]treamingAssets/aa.meta
/[Aa]ssets/[Ss]treamingAssets/aa/*
/ios_build

# Backup and temp files (keep repo clean)
*.bak
*.orig
*.swp
*~
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gitignore *~ pattern silently ignores Samples~ directory

High Severity

The newly added *~ pattern in .gitignore matches any file or directory whose name ends with ~, which includes the Samples~ directory also introduced in this PR. While currently committed files are unaffected, any new untracked files added to Samples~/ in the future will be silently git-ignored. Developers won't see them in git status and git add will refuse them without -f. This directly undermines the UPM samples workflow this PR sets up. A negation rule like !Samples~ is needed.

Additional Locations (1)
Fix in Cursor Fix in Web

8 changes: 0 additions & 8 deletions Assets/Resources.meta

This file was deleted.

1 change: 0 additions & 1 deletion Assets/Resources/BillingMode.json

This file was deleted.

7 changes: 0 additions & 7 deletions Assets/Resources/BillingMode.json.meta

This file was deleted.

8 changes: 0 additions & 8 deletions Assets/Stash.Native.meta

This file was deleted.

8 changes: 0 additions & 8 deletions Assets/Stash.Native/Editor/StashEditorPlugin.meta

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions Assets/Stash.Native/Sample/Scripts.meta

This file was deleted.

8 changes: 0 additions & 8 deletions Assets/Stash.Native/Scripts.meta

This file was deleted.

18 changes: 18 additions & 0 deletions Packages/gg.stash.unity/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Changelog

All notable changes to this package will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [2.0.0] - 2025-03-16

### Changed

- **UPM (Unity Package Manager) support**: Package restructured for full UPM compatibility. Content moved from `Assets/Stash.Native/` to `Packages/gg.stash.unity/` with standard layout: `Runtime/`, `Editor/`, `Plugins/`, `Samples~/`.
- Added assembly definitions (`Stash.Unity`, `Stash.Unity.Editor`) for compilation isolation.
- Samples are now importable via Package Manager (Window > Package Manager > Stash for Unity > Samples).

### Installation

- **Git URL**: Add package from git URL: `https://github.com/stashgg/stash-unity.git?path=Packages/gg.stash.unity`
- **manifest.json**: Add `"gg.stash.unity": "https://github.com/stashgg/stash-unity.git?path=Packages/gg.stash.unity"` to dependencies.
7 changes: 7 additions & 0 deletions Packages/gg.stash.unity/CHANGELOG.md.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Packages/gg.stash.unity/Editor/Editor.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions Packages/gg.stash.unity/Editor/Stash.Unity.Editor.asmdef
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "Stash.Unity.Editor",
"rootNamespace": "Stash.Editor",
"references": [
"Stash.Unity"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
Loading
Loading