1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-22 11:58:46 +00:00

ci(upm): update package.json in upm branch (#69)

This commit is contained in:
Oliver Booth 2023-03-29 16:03:48 +01:00
parent 7a119fc3c1
commit 9ecbbee571
No known key found for this signature in database
GPG Key ID: 20BEB9DC87961025
6 changed files with 72 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View 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}));

View 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>

View File

@ -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