CI, nuget
Build / Build (push) Successful in 1m13s

This commit is contained in:
Deukhoofd committed 2026-11-17 21:50:46 +01:00
1 parent b564d5cc67
commit 2456f37e3e
4 files changed
+67 -1

No files matched your search

+47
View File
@@ -0,0 +1,47 @@
name: Build
run-name: Build ${{ github.event.repository.name }} for ${{ github.actor }}
on: [ push, pull_request ]
env:
TERM: xterm
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: true
DOTNET_CONSOLE_ANSI_COLOR: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
Build:
runs-on: [ ubuntu-latest ]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
cache: true
cache-dependency-path: Directory.Packages.props
- name: Restore
run: dotnet restore Atomorph.NET.sln --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
run: dotnet build Atomorph.NET.sln -c Release --nologo --no-restore --verbosity quiet -p:Version=$VERSION
- name: Pack
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
run: dotnet pack Atomorph.NET.sln -c Release --nologo --no-restore --no-build -p:Version=$VERSION -o ./packages
# Needs a personal access token with write:package scope: Gitea's automatic Actions token
# only ever gets read access to the package registry, so pushing with it returns 401.
- 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>
+11
View File
@@ -7,6 +7,17 @@
<RootNamespace>Atomorph</RootNamespace> <RootNamespace>Atomorph</RootNamespace>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<Description>Image morphing library that uses fluid dynamics and optimal transport to produce intuitive morphs.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageProjectUrl>https://git.p-epsilon.com/Deukhoofd/Atomorph.NET</PackageProjectUrl>
</PropertyGroup>
<ItemGroup>
<None Include="..\README.md" Pack="true" PackagePath="\" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="PcgRandom" /> <PackageReference Include="PcgRandom" />
</ItemGroup> </ItemGroup>
+8 -1
View File
@@ -10,8 +10,15 @@
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<VersionPrefix>0.1.0</VersionPrefix>
<Authors>Deukhoofd</Authors>
<RepositoryUrl>https://git.p-epsilon.com/Deukhoofd/Atomorph.NET</RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="JetBrains.Annotations"/> <PackageReference Include="JetBrains.Annotations" PrivateAssets="all"/>
<PackageReference Include="PolySharp"> <PackageReference Include="PolySharp">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>