4 files changed
+30
-2
No files matched your search
@@ -24,7 +24,25 @@ jobs:
|
|||||||
cache-dependency-path: Directory.Packages.props
|
cache-dependency-path: Directory.Packages.props
|
||||||
- name: Restore
|
- name: Restore
|
||||||
run: dotnet restore PkmnLib.NET.slnx --nologo --verbosity quiet
|
run: dotnet restore PkmnLib.NET.slnx --nologo --verbosity quiet
|
||||||
|
- name: Determine version
|
||||||
|
run: |
|
||||||
|
if [[ "$GITHUB_REF" == refs/tags/v* ]]; then
|
||||||
|
VERSION="${GITHUB_REF_NAME#v}"
|
||||||
|
else
|
||||||
|
VERSION="0.1.0-ci.${GITHUB_RUN_NUMBER}"
|
||||||
|
fi
|
||||||
|
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
|
||||||
- name: Build
|
- name: Build
|
||||||
run: dotnet build PkmnLib.NET.slnx -c Release --nologo --verbosity quiet -p:NoWarn=CS1591
|
run: dotnet build PkmnLib.NET.slnx -c Release --nologo --verbosity quiet -p:NoWarn=CS1591 -p:Version=$VERSION
|
||||||
- name: Test
|
- name: Test
|
||||||
run: dotnet test -c Release --nologo --no-restore --no-build -- --disable-logo
|
run: dotnet test -c Release --nologo --no-restore --no-build -- --disable-logo
|
||||||
|
- name: Pack
|
||||||
|
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
|
||||||
|
run: dotnet pack PkmnLib.NET.slnx -c Release --nologo --no-restore --no-build -p:Version=$VERSION -o ./packages
|
||||||
|
- name: Publish to Gitea NuGet feed
|
||||||
|
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
|
||||||
|
run: >
|
||||||
|
dotnet nuget push "./packages/*.nupkg"
|
||||||
|
--source "${{ github.server_url }}/api/packages/${{ github.repository_owner }}/nuget/index.json"
|
||||||
|
--api-key "${{ secrets.PACKAGES_TOKEN }}"
|
||||||
|
--skip-duplicate
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
<TargetFramework>net9.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
<IsPackable>false</IsPackable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -12,6 +12,13 @@
|
|||||||
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
|
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<VersionPrefix>0.1.0</VersionPrefix>
|
||||||
|
<Authors>Deukhoofd</Authors>
|
||||||
|
<RepositoryUrl>https://git.p-epsilon.com/Deukhoofd/PkmnLib.NET</RepositoryUrl>
|
||||||
|
<RepositoryType>git</RepositoryType>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="JetBrains.Annotations"/>
|
<PackageReference Include="JetBrains.Annotations"/>
|
||||||
<PackageReference Include="PolySharp">
|
<PackageReference Include="PolySharp">
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
<IsRoslynComponent>true</IsRoslynComponent>
|
<IsRoslynComponent>true</IsRoslynComponent>
|
||||||
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
|
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
|
||||||
|
<!-- Build-time only: its output is compiled into PkmnLib.Plugin.Gen7, so it is not published. -->
|
||||||
|
<IsPackable>false</IsPackable>
|
||||||
<!-- Ensures the dependency dlls below are handed to the consuming compilation as analyzer
|
<!-- Ensures the dependency dlls below are handed to the consuming compilation as analyzer
|
||||||
references; a ProjectReference'd analyzer only passes its own assembly by default. -->
|
references; a ProjectReference'd analyzer only passes its own assembly by default. -->
|
||||||
<GetTargetPathDependsOn>$(GetTargetPathDependsOn);GetDependencyTargetPaths</GetTargetPathDependsOn>
|
<GetTargetPathDependsOn>$(GetTargetPathDependsOn);GetDependencyTargetPaths</GetTargetPathDependsOn>
|
||||||
|
|||||||
Reference in new issue
Block a user