Skip to content

Commit

Permalink
Merge pull request #11 from statisticssweden/feature/nuget_action
Browse files Browse the repository at this point in the history
Automatic releases to nuget when creating releases
  • Loading branch information
likp committed May 24, 2021
2 parents 7693d13 + 0dce90e commit fa38a1b
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 3 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Nuget

on:
release:
types: [published]

jobs:
release:

runs-on: windows-2019

steps:

- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: microsoft/setup-msbuild@v1

- uses: NuGet/setup-nuget@v1

- name: Restore NuGet packages
run: nuget restore

- name: Build the application
run: msbuild /p:Configuration=Release

- name: Depoly to Nuget
run: |
$package = Get-ChildItem -Recurse -Filter *.nupkg
nuget push $package $env:nuget_api_key -src https://nuget.org
env:
nuget_api_key: ${{ secrets.NUGET_API_KEY }}

11 changes: 8 additions & 3 deletions PCAxis.Core/PCAxis.Core.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
<PropertyGroup>
<RootNamespace></RootNamespace>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageId>PcAxis.Core</PackageId>
<MinVerTagPrefix>v</MinVerTagPrefix>
<MinVerDefaultPreReleasePhase>beta</MinVerDefaultPreReleasePhase>
<MinVerSkip Condition="'$(Configuration)' == 'Debug'">true</MinVerSkip>
<SignAssembly>false</SignAssembly>
<AssemblyOriginatorKeyFile></AssemblyOriginatorKeyFile>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>1.0.2</Version>
<Description>Core library for the PX platform</Description>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageProjectUrl>https://github.com/statisticssweden/PCAxis.Core</PackageProjectUrl>
Expand All @@ -16,8 +19,6 @@
<PackageIcon></PackageIcon>
<PackageIconUrl />
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<AssemblyVersion>1.0.2.0</AssemblyVersion>
<FileVersion>1.0.2.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand All @@ -38,6 +39,10 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="MinVer" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0" />
</ItemGroup>

Expand Down

0 comments on commit fa38a1b

Please sign in to comment.