NuGet package
This commit is contained in:
parent
cedeb6fbbb
commit
857a793bf5
|
@ -1,7 +1,17 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Library</OutputType>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<AssemblyName>HabitSharp</AssemblyName>
|
||||
<PackageId>HabitSharp</PackageId>
|
||||
<VersionPrefix>0.1.0</VersionPrefix>
|
||||
<Authors>Lucidiot</Authors>
|
||||
<Company>Lucidiot</Company>
|
||||
<Description>API client for Habitica.</Description>
|
||||
<PackageLicenseUrl>https://gitlab.com/Lucidiot/HabitSharp/blob/master/LICENSE</PackageLicenseUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<RepositoryUrl>https://gitlab.com/Lucidiot/HabitSharp</RepositoryUrl>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
NUGET_SOURCE:=Brainshit
|
||||
|
||||
run:
|
||||
dotnet run
|
||||
|
||||
all:
|
||||
dotnet build
|
||||
|
||||
clean:
|
||||
rm -rf bin
|
||||
find . -type f -name '*.nupkg' -not -path '*/.git/*' -delete
|
||||
|
||||
tests:
|
||||
dotnet test
|
||||
|
||||
restore:
|
||||
dotnet restore
|
||||
|
||||
push-latest: VERSION_SUFFIX=latest
|
||||
push-latest: push
|
||||
|
||||
push: clean
|
||||
dotnet pack --version-suffix "$(VERSION_SUFFIX)"
|
||||
[ -z "$(NUGET_API_KEY)" ] && echo "The NUGET_API_KEY variable is required to push to a NuGet server" && exit 1 || true
|
||||
find . -type f -name '*.nupkg' -not -path '*/.git/*' | xargs -n1 -I '{}' dotnet nuget push {} -k "$(NUGET_API_KEY)" -s "$(NUGET_SOURCE)"
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<config>
|
||||
<add key="defaultPushSource" value="Brainshit" />
|
||||
</config>
|
||||
<packageSources>
|
||||
<add key="Brainshit" value="https://nuget.brainshit.fr" />
|
||||
</packageSources>
|
||||
</configuration>
|
Reference in New Issue