mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-22 17:18:48 +00:00
ci(upm): update package.json in upm branch (#69)
This commit is contained in:
parent
7a119fc3c1
commit
9ecbbee571
6
.github/workflows/nightly.yml
vendored
6
.github/workflows/nightly.yml
vendored
@ -48,6 +48,11 @@ jobs:
|
||||
ref: upm
|
||||
path: upm
|
||||
|
||||
- name: Build package.json
|
||||
run: |
|
||||
dotnet run --project ./X10D.UpmPackageGenerator/X10D.UpmPackageGenerator.csproj "./X10D/bin/Debug/netstandard2.1/X10D.dll"
|
||||
cp package.json upm/package.json
|
||||
|
||||
- name: Commit update
|
||||
run: |
|
||||
cd upm
|
||||
@ -61,5 +66,6 @@ jobs:
|
||||
git add X10D.Unity.dll
|
||||
git add X10D.xml
|
||||
git add X10D.Unity.xml
|
||||
git add package.json
|
||||
git commit -m "Update upm branch ($GITHUB_SHA)"
|
||||
git push
|
||||
|
6
.github/workflows/prerelease.yml
vendored
6
.github/workflows/prerelease.yml
vendored
@ -54,6 +54,11 @@ jobs:
|
||||
ref: upm
|
||||
path: upm
|
||||
|
||||
- name: Build package.json
|
||||
run: |
|
||||
dotnet run --project ./X10D.UpmPackageGenerator/X10D.UpmPackageGenerator.csproj "./X10D/bin/Release/netstandard2.1/X10D.dll"
|
||||
cp package.json upm/package.json
|
||||
|
||||
- name: Commit update
|
||||
run: |
|
||||
cd upm
|
||||
@ -67,5 +72,6 @@ jobs:
|
||||
git add X10D.Unity.dll
|
||||
git add X10D.xml
|
||||
git add X10D.Unity.xml
|
||||
git add package.json
|
||||
git commit -m "Update upm branch ($GITHUB_SHA)"
|
||||
git push
|
||||
|
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@ -54,6 +54,11 @@ jobs:
|
||||
ref: upm
|
||||
path: upm
|
||||
|
||||
- name: Build package.json
|
||||
run: |
|
||||
dotnet run --project ./X10D.UpmPackageGenerator/X10D.UpmPackageGenerator.csproj "./X10D/bin/Release/netstandard2.1/X10D.dll"
|
||||
cp package.json upm/package.json
|
||||
|
||||
- name: Commit update
|
||||
run: |
|
||||
cd upm
|
||||
@ -67,5 +72,6 @@ jobs:
|
||||
git add X10D.Unity.dll
|
||||
git add X10D.xml
|
||||
git add X10D.Unity.xml
|
||||
git add package.json
|
||||
git commit -m "Update upm branch ($GITHUB_SHA)"
|
||||
git push
|
||||
|
36
X10D.UpmPackageGenerator/Program.cs
Normal file
36
X10D.UpmPackageGenerator/Program.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
|
||||
string version;
|
||||
|
||||
if (args.Length == 0 || string.IsNullOrWhiteSpace(args[0]))
|
||||
{
|
||||
version = Environment.GetEnvironmentVariable("GITHUB_SHA") ?? "0.0.0";
|
||||
}
|
||||
|
||||
string path = args[0];
|
||||
var assembly = Assembly.LoadFrom(path);
|
||||
var attribute = assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>();
|
||||
if (attribute is null || string.IsNullOrWhiteSpace(attribute.InformationalVersion))
|
||||
{
|
||||
version = Environment.GetEnvironmentVariable("GITHUB_SHA") ?? "0.0.0";
|
||||
}
|
||||
else
|
||||
{
|
||||
version = attribute.InformationalVersion;
|
||||
}
|
||||
|
||||
var package = new
|
||||
{
|
||||
name = "me.olivr.x10d",
|
||||
author = new {name = "Oliver Booth", email = "me@olivr.me", url = "https://oliverbooth.dev"},
|
||||
displayName = "X10D",
|
||||
version,
|
||||
unity = "2021.3",
|
||||
description = "Extension methods on crack",
|
||||
keywords = new[] {"dotnet", "extension-methods"},
|
||||
changelogUrl = "https://github.com/oliverbooth/X10D/blob/main/CHANGELOG.md",
|
||||
licensesUrl = "https://github.com/oliverbooth/X10D/blob/main/LICENSE.md"
|
||||
};
|
||||
|
||||
Console.WriteLine(JsonSerializer.Serialize(package, new JsonSerializerOptions {WriteIndented = true}));
|
10
X10D.UpmPackageGenerator/X10D.UpmPackageGenerator.csproj
Normal file
10
X10D.UpmPackageGenerator/X10D.UpmPackageGenerator.csproj
Normal file
@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
8
X10D.sln
8
X10D.sln
@ -41,6 +41,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Workflows", "Workflows", "{
|
||||
.github\workflows\unity.yml = .github\workflows\unity.yml
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "X10D.UpmPackageGenerator", "X10D.UpmPackageGenerator\X10D.UpmPackageGenerator.csproj", "{CCBF047D-1B01-45EC-8D89-B00B4AC482CA}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -75,6 +77,10 @@ Global
|
||||
{B04AF429-30CF-4B69-81BA-38F560CA9126}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B04AF429-30CF-4B69-81BA-38F560CA9126}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B04AF429-30CF-4B69-81BA-38F560CA9126}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CCBF047D-1B01-45EC-8D89-B00B4AC482CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CCBF047D-1B01-45EC-8D89-B00B4AC482CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CCBF047D-1B01-45EC-8D89-B00B4AC482CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CCBF047D-1B01-45EC-8D89-B00B4AC482CA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@ -82,4 +88,6 @@ Global
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {6F733785-8837-410C-BD91-C4AD1F0A6914}
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
Loading…
Reference in New Issue
Block a user