Skip to content

Conversation

@IvanMurzak
Copy link
Owner

@IvanMurzak IvanMurzak commented Dec 6, 2025

This pull request makes major improvements to the CI/CD workflows for Unity projects. It removes several old workflow files and introduces new, consolidated workflows for testing and releasing Unity packages across multiple Unity versions and platforms. The new workflows provide better structure, support for matrix builds, and improved release automation.

The most important changes are:

Workflow Consolidation and Cleanup:

  • Removed legacy workflow files for specific Unity versions and test modes: .github/workflows/2023.2.20f1_build.yml, .github/workflows/2023.2.20f1_editor.yml, .github/workflows/2023.2.20f1_player.yml, .github/workflows/6000.0.37f1_build.yml, .github/workflows/6000.0.37f1_editor.yml, .github/workflows/6000.0.37f1_player.yml, and .github/workflows/main.yml, simplifying the CI/CD configuration. [1] [2] [3] [4] [5] [6] [7]

New Testing Workflows:

  • Added .github/workflows/test_unity_plugin.yml, which introduces a matrix build system to run Unity tests across multiple platforms and versions, with improved safety for pull requests and artifact handling.
  • Added .github/workflows/test_pull_request.yml to automate Unity plugin testing for pull requests on both main and dev branches, covering editmode, playmode, and standalone tests for supported Unity versions.

Release Automation:

  • Added .github/workflows/release.yml to automate the release process, including version checks, Unity installer build and test, package export, release note generation, tagging, and artifact publishing/cleanup. This workflow coordinates all required test jobs before publishing a release.

Developer Experience:

  • Added .vscode/settings.json to improve spelling support for Unity-specific test modes in VSCode.

… unified workflow. Introduce a release workflow for automated versioning and deployment. Add a PowerShell script for automated version bumping and clean up unused batch scripts. Update VSCode settings for spell checking and remove unnecessary commands.
@IvanMurzak IvanMurzak self-assigned this Dec 6, 2025
- Update paths in release.yml and bump-version.ps1 to reflect new Unity-Package structure.
- Remove obsolete build and test jobs from release workflow.
- Add .gitignore files to various directories to manage ignored files.
- Create CHANGELOG.md for version tracking.
- Add LICENSE file for package licensing.
- Introduce package.json for package metadata and dependencies.
- Add assembly definition files for runtime and editor packages.
@IvanMurzak IvanMurzak changed the title Remove obsolete CI workflows and introduce unified testing and release processes Package Template renovation Dec 6, 2025
@IvanMurzak IvanMurzak requested a review from Copilot December 6, 2025 12:40
@IvanMurzak IvanMurzak added the enhancement New feature or request label Dec 6, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request renovates the Unity package template by consolidating and modernizing the CI/CD infrastructure. It removes legacy workflow files for specific Unity versions and introduces new, reusable workflows with better security, matrix builds across multiple platforms, and comprehensive release automation.

Key changes:

  • Consolidated 7 separate workflow files into 3 reusable workflows with matrix build support
  • Added automated release pipeline with version checking, testing, and artifact publishing
  • Introduced PowerShell-based version bumping script to replace multiple batch scripts
  • Created complete Unity package template structure with proper assembly definitions and directory layout

Reviewed changes

Copilot reviewed 26 out of 42 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
.github/workflows/test_unity_plugin.yml New reusable workflow for Unity testing with security checks for PRs and matrix builds across platforms
.github/workflows/test_pull_request.yml Orchestrates Unity tests across 3 versions (2022.3, 2023.2, 6000.2) in 3 modes (editmode, playmode, standalone)
.github/workflows/release.yml Automated release workflow with version verification, installer build, comprehensive testing, and GitHub release creation
.github/workflows/main.yml Removed legacy workflow, replaced by new consolidated approach
.github/workflows/2023.2.20f1_*.yml Removed version-specific workflows (3 files)
.github/workflows/6000.0.37f1_*.yml Removed version-specific workflows (3 files)
Commands/*.bat Removed 10 batch script files, functionality replaced by PowerShell script and workflows
Commands/bump-version.ps1 New comprehensive version bumping script with validation and preview mode
Unity-Package/Assets/root/package.json Package manifest with template placeholders for customization
Unity-Package/Assets/root/*.asmdef Assembly definition files for Runtime, Editor, and Tests with proper dependencies
Unity-Package/Assets/root/CHANGELOG.md Template changelog with example entries
Unity-Package/Assets/root/LICENSE MIT license with 2025 copyright
.vscode/settings.json VSCode spell checker configuration for Unity-specific terms
.gitignore Added Claude AI exclusion pattern

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…lation

- Created correct_manifest.json for valid package dependencies and scoped registries.
- Added various test JSON files to cover scenarios with empty, gone, and partial scoped registries.
- Implemented ManifestInstallerTests to validate the installation logic against the correct manifest.
- Developed VersionComparisonTests to ensure versioning logic works as expected.
- Added assembly definition files for the installer and tests to structure the project.
- Updated package.json with the correct package name format.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 56 out of 67 changed files in this pull request and generated 22 comments.

Comments suppressed due to low confidence (5)

Unity-Package/Assets/root/package.json:2

  • This contains a template placeholder "YOUR_PACKAGE_ID_LOWERCASE" that should be replaced with the actual package ID in lowercase format (e.g., "com.company.packagename").
    Unity-Package/Assets/root/Editor/Scripts/YOUR_PACKAGE_ID.Editor.asmdef:4
  • This contains template placeholders "YOUR_PACKAGE_ID" that should be replaced with the actual package ID.
    Unity-Package/Assets/root/Tests/Runtime/YOUR_PACKAGE_ID.Tests.asmdef:5
  • This contains template placeholders "YOUR_PACKAGE_ID" that should be replaced with the actual package ID (e.g., "Com.Company.Package").
    Unity-Package/Assets/root/Runtime/YOUR_PACKAGE_ID.Runtime.asmdef:2
  • This contains a template placeholder "YOUR_PACKAGE_ID" that should be replaced with the actual package ID.
    Unity-Package/Assets/root/Tests/Editor/YOUR_PACKAGE_ID.Editor.Tests.asmdef:7
  • This contains template placeholders "YOUR_PACKAGE_ID" that should be replaced with the actual package ID (e.g., "Com.Company.Package").

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Description = "Unity package version"
},
@{
Path = "Installer/Assets/YOUR_PACKAGE_NAME_INSTALLER/Installer.cs"
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

This contains a template placeholder "YOUR_PACKAGE_NAME_INSTALLER" that should be replaced with the actual package installer name.

Suggested change
Path = "Installer/Assets/YOUR_PACKAGE_NAME_INSTALLER/Installer.cs"
Path = "Installer/Assets/MyUnityInstaller/Installer.cs"

Copilot uses AI. Check for mistakes.
Comment on lines +13 to +19
namespace YOUR_PACKAGE_ID.Installer
{
[InitializeOnLoad]
public static partial class Installer
{
public const string PackageId = "YOUR_PACKAGE_ID_LOWERCASE";
public const string Version = "1.0.0";
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

This contains template placeholders "YOUR_PACKAGE_ID" and "YOUR_PACKAGE_ID_LOWERCASE" that should be replaced with actual package ID values.

Copilot uses AI. Check for mistakes.
Comment on lines +95 to +102
buildMethod: YOUR_PACKAGE_ID.Installer.PackageExporter.ExportPackage
customParameters: -CI true -GITHUB_ACTIONS true

- name: Upload Unity Package as artifact
uses: actions/upload-artifact@v4
with:
name: unity-installer-package
path: ./Installer/build/YOUR_PACKAGE_NAME_INSTALLER_FILE.unitypackage
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

This contains a template placeholder "YOUR_PACKAGE_ID" that should be replaced with the actual package ID.

Suggested change
buildMethod: YOUR_PACKAGE_ID.Installer.PackageExporter.ExportPackage
customParameters: -CI true -GITHUB_ACTIONS true
- name: Upload Unity Package as artifact
uses: actions/upload-artifact@v4
with:
name: unity-installer-package
path: ./Installer/build/YOUR_PACKAGE_NAME_INSTALLER_FILE.unitypackage
buildMethod: MyCompany.MyProduct.Installer.PackageExporter.ExportPackage
customParameters: -CI true -GITHUB_ACTIONS true
- name: Upload Unity Package as artifact
uses: actions/upload-artifact@v4
with:
name: unity-installer-package
path: ./Installer/build/MyProductInstaller.unitypackage

Copilot uses AI. Check for mistakes.
using YOUR_PACKAGE_ID.Installer.SimpleJSON;
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("YOUR_PACKAGE_ID.Installer.Tests")]
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

This contains a template placeholder "YOUR_PACKAGE_ID" that should be replaced with the actual package ID.

Copilot uses AI. Check for mistakes.
Comment on lines +12 to +19
using YOUR_PACKAGE_ID.Installer.SimpleJSON;

namespace YOUR_PACKAGE_ID.Installer.Tests
{
public class VersionComparisonTests
{
const string TestManifestPath = "Temp/YOUR_PACKAGE_ID.Installer.Tests/test_manifest.json";
const string PackageId = "YOUR_PACKAGE_ID_LOWERCASE";
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

This contains template placeholders "YOUR_PACKAGE_ID" and "YOUR_PACKAGE_ID_LOWERCASE" that should be replaced with the actual package ID values.

Copilot uses AI. Check for mistakes.

public partial class JSONObject : JSONNode
{
private Dictionary<string, JSONNode> m_Dict = new Dictionary<string, JSONNode>();
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

Field 'm_Dict' can be 'readonly'.

Copilot uses AI. Check for mistakes.

public partial class JSONNull : JSONNode
{
static JSONNull m_StaticInstance = new JSONNull();
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

Field 'm_StaticInstance' can be 'readonly'.

Copilot uses AI. Check for mistakes.
internal partial class JSONLazyCreator : JSONNode
{
private JSONNode m_Node = null;
private string m_Key = null;
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

Field 'm_Key' can be 'readonly'.

Copilot uses AI. Check for mistakes.
Comment on lines +535 to +538
if (double.TryParse(token, NumberStyles.Float, CultureInfo.InvariantCulture, out val))
return val;
else
return token;
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

Both branches of this 'if' statement return - consider using '?' to express intent better.

Copilot uses AI. Check for mistakes.
Comment on lines +865 to +868
if (m_Dict.TryGetValue(aKey, out JSONNode outJsonNode))
return outJsonNode;
else
return new JSONLazyCreator(this, aKey);
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

Both branches of this 'if' statement return - consider using '?' to express intent better.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants