Mirror/.releaserc.yml
MrGadget 83629bcc67
chore(CI): Update Semantic to use UnityPack Script (#3840)
* UnityPack CSX

* fixed path

* try cmd

* try bash

* try script

* try prepareCmd

* Fix errors

* AddFilesRecursive extension

* dotnet 5 and dotnet-scriopt 1.1.0

* dotnet-script 1.5.0

* dotnet 8

* Environment.GetCommandLineArgs

* separate extension script

* typo

* Updated ArchiveExtension

* AddFilesRecursive without extension

* fix args iterator

* Deleted ArchiveExtension

* Removed commented code

* UnityPack: Methods in order

* MIT License

* Suppress Release Notes

* Added Console Logging

* fix: Test1

* Syntax

* Syntax

* log args

* fix: args parsing

* fix: More Logging plus version

* Syntax

* fix: Try fix paths

* fix: Reverse slashes in RootPath to match entry.Name

* fix: GetRelativePath use Path.GetTempPath

* fix: Use tempPath

* fix: Enable release notes

* Remove Hosting folder

* fix: Remove Edgegap

* Cleanup

* fix: Minified dependencies JSON and >=3.2.1 version for NewtonSoft

* fix: NewtonSoft v3.0.0
2024-06-18 16:36:11 -04:00

70 lines
2.5 KiB
YAML

verifyConditions:
- "@semantic-release/github"
plugins:
# Determines the type of release to create, if any.
# See https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#type
# More types can be added here and in release-notes-generator below.
- - '@semantic-release/commit-analyzer'
- preset: "angular"
releaseRules:
- type: "breaking"
release: "major"
- type: "release"
release: "major"
- type: "feature"
release: "minor"
# Extends the behavior of semantic-release to generate release notes.
# 'fix' and 'feat' are built in and don't need to be defined here.
# More types can be added to correspond with commit-analyzer above.
- - '@semantic-release/release-notes-generator'
- preset: "conventionalcommits"
presetConfig:
types:
- type: "breaking"
section: "Breaking Changes"
hidden: false
- type: "release"
section: "Release"
hidden: false
- type: "fix"
section: "Bug Fixes"
hidden: false
- type: "feat"
section: "Features"
hidden: false
- type: "feature"
section: "Features"
hidden: false
# Write the new version in version.txt
- - '@semantic-release/exec'
- prepareCmd: "echo ${nextRelease.version} > Assets/Mirror/version.txt"
# Remove Test folder so it's excluded from Unity package
# -f: force, -r: recursive
- - '@semantic-release/exec'
- prepareCmd: "rm -f -r Assets/Mirror/Tests && rm -f Assets/Mirror/Tests.meta"
# Remove EdgeGap Hosting folder so it's excluded from Unity package
# -f: force, -r: recursive
- - '@semantic-release/exec'
- prepareCmd: "rm -f -r Assets/Mirror/Hosting && rm -f Assets/Mirror/Hosting.meta"
# Move ScriptTemplates to Mirror folder so they're included in Unity package
# There's an editor script that moves them back to Assets when imported to Unity
- - '@semantic-release/exec'
- prepareCmd: "mv Assets/ScriptTemplates Assets/Mirror/ && mv Assets/ScriptTemplates.meta Assets/Mirror/"
# Create Unity package with Mirror, ScriptTemplates, and LICENSE
- - '@semantic-release/exec'
- prepareCmd: "dotnet script .github/UnityPack.csx Mirror.unitypackage ${nextRelease.version} Assets/Mirror Assets/Mirror LICENSE Assets/Mirror/LICENSE"
# Create a new release on GitHub
- - '@semantic-release/github'
- assets:
- path: "Mirror.unitypackage"
label: "Mirror Unity Package"
name: "Mirror-${nextRelease.version}.unitypackage"