mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.Deployment.git
synced 2025-11-19 21:08:45 +08:00
Nuget package
This commit is contained in:
28
.github/workflows/Publish.yml
vendored
Normal file
28
.github/workflows/Publish.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
name: Build and Publish NuGet Package
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: '8.x'
|
||||
|
||||
- name: Build Tool
|
||||
run: dotnet publish src/Snap.Hutao.Deployment/Snap.Hutao.Deployment.csproj
|
||||
|
||||
- name: Pack
|
||||
run: dotnet pack src/Snap.Hutao.Deployment.Runtime/Snap.Hutao.Deployment.Runtime.csproj
|
||||
|
||||
- name: Publish to NuGet
|
||||
run: dotnet nuget push src/Snap.Hutao.Deployment.Runtime/bin/Release/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}
|
||||
5
src/Snap.Hutao.Deployment.Runtime/.gitignore
vendored
Normal file
5
src/Snap.Hutao.Deployment.Runtime/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
.vs/
|
||||
bin/
|
||||
obj/
|
||||
|
||||
*.user
|
||||
@@ -0,0 +1,30 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<IsPackable>true</IsPackable>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>disable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<NuSpecFile>Snap.Hutao.Deployment.Runtime.nuspec</NuSpecFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemDefinitionGroup>
|
||||
<PackageReference>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="bin">
|
||||
<Pack>false</Pack>
|
||||
</None>
|
||||
<None Include="obj">
|
||||
<Pack>false</Pack>
|
||||
</None>
|
||||
<Content Include="Snap.Hutao.Deployment.exe">
|
||||
<Pack>true</Pack>
|
||||
<PackagePath>runtimes\win-x64\</PackagePath>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>Snap.Hutao.Deployment.Runtime</id>
|
||||
<version>1.1.0</version>
|
||||
<authors>DGP Studio</authors>
|
||||
<developmentDependency>true</developmentDependency>
|
||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||
<license type="expression">MIT</license>
|
||||
<licenseUrl>https://licenses.nuget.org/MIT</licenseUrl>
|
||||
<projectUrl>https://github.com/DGP-Studio/Snap.Hutao.Deployment</projectUrl>
|
||||
<description>Deployment tool for Snap.Hutao</description>
|
||||
<repository type="git" url="https://github.com/DGP-Studio/Snap.Hutao.Deployment" commit="$commit$" />
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="Snap.Hutao.Deployment.exe" target="runtimes/win-x64/Snap.Hutao.Deployment.exe"/>
|
||||
</files>
|
||||
</package>
|
||||
BIN
src/Snap.Hutao.Deployment.Runtime/Snap.Hutao.Deployment.exe
Normal file
BIN
src/Snap.Hutao.Deployment.Runtime/Snap.Hutao.Deployment.exe
Normal file
Binary file not shown.
1
src/Snap.Hutao.Deployment/.gitignore
vendored
1
src/Snap.Hutao.Deployment/.gitignore
vendored
@@ -2,5 +2,4 @@
|
||||
bin/
|
||||
obj/
|
||||
|
||||
*.pubxml
|
||||
*.user
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
<PublishDir>..\Snap.Hutao.Deployment.Runtime\</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<_TargetId>Folder</_TargetId>
|
||||
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<SelfContained>true</SelfContained>
|
||||
<PublishReadyToRun>false</PublishReadyToRun>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -3,7 +3,12 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.8.34330.188
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Snap.Hutao.Deployment", "Snap.Hutao.Deployment.csproj", "{B457BB36-A85E-4C2B-91C1-9453949445E3}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Snap.Hutao.Deployment", "Snap.Hutao.Deployment.csproj", "{B457BB36-A85E-4C2B-91C1-9453949445E3}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Snap.Hutao.Deployment.Runtime", "..\Snap.Hutao.Deployment.Runtime\Snap.Hutao.Deployment.Runtime.csproj", "{571467C6-27D3-4EC6-A937-D244E86D8400}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{B457BB36-A85E-4C2B-91C1-9453949445E3} = {B457BB36-A85E-4C2B-91C1-9453949445E3}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@@ -21,6 +26,14 @@ Global
|
||||
{B457BB36-A85E-4C2B-91C1-9453949445E3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B457BB36-A85E-4C2B-91C1-9453949445E3}.Release|x64.ActiveCfg = Release|x64
|
||||
{B457BB36-A85E-4C2B-91C1-9453949445E3}.Release|x64.Build.0 = Release|x64
|
||||
{571467C6-27D3-4EC6-A937-D244E86D8400}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{571467C6-27D3-4EC6-A937-D244E86D8400}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{571467C6-27D3-4EC6-A937-D244E86D8400}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{571467C6-27D3-4EC6-A937-D244E86D8400}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{571467C6-27D3-4EC6-A937-D244E86D8400}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{571467C6-27D3-4EC6-A937-D244E86D8400}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{571467C6-27D3-4EC6-A937-D244E86D8400}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{571467C6-27D3-4EC6-A937-D244E86D8400}.Release|x64.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
Reference in New Issue
Block a user