Skip to content

Commit

Permalink
Merge pull request #124 from holos-aafc/feature/nuget-org-packaging
Browse files Browse the repository at this point in the history
Change github actions to push to nuget.org
  • Loading branch information
holos-aafc authored Apr 17, 2024
2 parents ccb16c8 + 9006b79 commit c590934
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 9 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/_dotnet-nuget-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
jobs:
reusable_workflow_job:
runs-on: windows-latest
env:
NUGET_AUTH_TOKEN: ${{ secrets.HOLOS_ACTION_SECRET }}
steps:

- name: Get date/time
Expand Down Expand Up @@ -39,12 +41,15 @@ jobs:

- name: Add registry
run: dotnet nuget add source --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"

- name: Publish packages to nuget.org
run: dotnet nuget push "*/**/aafc*.nupkg" -k $env:NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json

- name: Publish package
run: dotnet nuget push "*/**/h.*.nupkg" --api-key ${{ secrets.GITHUB_TOKEN }} --source "github"
- name: Publish packages to github
run: dotnet nuget push "*/**/aafc*.nupkg" --api-key ${{ secrets.GITHUB_TOKEN }} --source "github"

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: Holos4-nuget-pkg
path: '*/**/h.*.nupkg'
path: '*/**/aafc*.nupkg'
3 changes: 3 additions & 0 deletions .github/workflows/dotnet-build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
jobs:
build:
uses: ./.github/workflows/_dotnet-build-template.yml
secrets: inherit
with:
configuration: Release
solution: Holos.sln
Expand All @@ -15,12 +16,14 @@ jobs:
nuget:
needs: build
uses: ./.github/workflows/_dotnet-nuget-template.yml
secrets: inherit
with:
configuration: Release

publish:
needs: build
uses: ./.github/workflows/_dotnet-publish-template.yml
secrets: inherit
with:
filename: Holos4-lib

7 changes: 6 additions & 1 deletion H.Content/H.Content.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<PackageId>H.Content</PackageId>
<PackageId>AAFC.Holos.Content</PackageId>
<Authors>AAFC</Authors>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageProjectUrl>https://github.com/holos-aafc/Holos</PackageProjectUrl>
<RepositoryUrl>https://github.com/holos-aafc/Holos</RepositoryUrl>
<PackageTags>holos, aafc, agriculture, ghg</PackageTags>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{272EDE97-F58A-42A9-828D-8B3524E390EB}</ProjectGuid>
Expand Down Expand Up @@ -416,6 +420,7 @@
<None Include="Resources\white_spruce__31_allclusters_future.csv" />
<None Include="Resources\WS_31_allclusters_past_CBM.csv" />
<None Include="Resources\WS__31_allclusters_future_DOM.csv" />
<None Include="..\LICENSE" Pack="true" PackagePath=""/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\H.Infrastructure\H.Infrastructure.csproj">
Expand Down
2 changes: 1 addition & 1 deletion H.Content/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("H.Content")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
7 changes: 6 additions & 1 deletion H.Core/H.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<PackageId>H.Core</PackageId>
<PackageId>AAFC.Holos.Core</PackageId>
<Authors>AAFC</Authors>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageProjectUrl>https://github.com/holos-aafc/Holos</PackageProjectUrl>
<RepositoryUrl>https://github.com/holos-aafc/Holos</RepositoryUrl>
<PackageTags>holos, aafc, agriculture, ghg</PackageTags>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{08D833EF-D06E-42F1-B548-89E985DFC26B}</ProjectGuid>
Expand Down Expand Up @@ -63,6 +67,7 @@
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<None Include="..\LICENSE" Pack="true" PackagePath=""/>
<Compile Include="Calculators\Carbon\CarbonCalculatorBase.cs" />
<Compile Include="Calculators\Carbon\CarbonCalculatorBase.Nitrogen.cs" />
<Compile Include="Calculators\Carbon\ICBMSoilCarbonCalculator.cs" />
Expand Down
2 changes: 1 addition & 1 deletion H.Core/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("H.Core")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
7 changes: 6 additions & 1 deletion H.Infrastructure/H.Infrastructure.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<PackageId>H.Infrastructure</PackageId>
<PackageId>AAFC.Holos.Infrastructure</PackageId>
<Authors>AAFC</Authors>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageProjectUrl>https://github.com/holos-aafc/Holos</PackageProjectUrl>
<RepositoryUrl>https://github.com/holos-aafc/Holos</RepositoryUrl>
<PackageTags>holos, aafc, agriculture, ghg</PackageTags>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{0C9D716E-6579-4EE6-AEA6-5B019563AD95}</ProjectGuid>
Expand Down Expand Up @@ -52,6 +56,7 @@
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<None Include="..\LICENSE" Pack="true" PackagePath=""/>
<Compile Include="Controls\TreeHelper.cs" />
<Compile Include="Controls\ValueConverters\BooleanToHeightConverter.cs" />
<Compile Include="Controls\ValueConverters\BooleanToVisibilityConverter.cs" />
Expand Down
2 changes: 1 addition & 1 deletion H.Infrastructure/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("H.Infrastructure")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down

0 comments on commit c590934

Please sign in to comment.