Skip to content

Commit 3e87193

Browse files
authored
Merge pull request #2 from statisticssweden/features/nuget_action
Added github action for deploying to nuget
2 parents 1478c6c + 6976966 commit 3e87193

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

.github/workflows/nuget.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Nuget
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
release:
9+
10+
runs-on: windows-2019
11+
12+
steps:
13+
14+
- uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
18+
- uses: microsoft/setup-msbuild@v1
19+
20+
- uses: NuGet/setup-nuget@v1
21+
22+
- name: Restore NuGet packages
23+
run: nuget restore
24+
25+
- name: Build the application
26+
run: msbuild /p:Configuration=Release
27+
28+
- name: Depoly to Nuget
29+
run: |
30+
$package = Get-ChildItem -Recurse -Filter *.nupkg
31+
nuget push $package $env:nuget_api_key -src https://nuget.org
32+
env:
33+
nuget_api_key: ${{ secrets.NUGET_API_KEY }}
34+

PCAxis.Menu.ConfigDatamodelMenu/PCAxis.Menu.ConfigDatamodelMenu.csproj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,25 @@
33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
55
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
6-
<Version>1.0.3</Version>
76
<PackageProjectUrl>https://github.com/statisticssweden/PCAxis.Menu.ConfigDatamodelMenu</PackageProjectUrl>
87
<PackageLicenseFile>LICENSE</PackageLicenseFile>
98
<RepositoryUrl>https://github.com/statisticssweden/PCAxis.Menu.ConfigDatamodelMenu.git</RepositoryUrl>
109
<RepositoryType>git</RepositoryType>
1110
<PackageTags>PX</PackageTags>
11+
<MinVerTagPrefix>v</MinVerTagPrefix>
12+
<MinVerDefaultPreReleasePhase>beta</MinVerDefaultPreReleasePhase>
13+
<MinVerSkip Condition="'$(Configuration)' == 'Debug'">true</MinVerSkip>
1214
</PropertyGroup>
1315

1416
<ItemGroup>
1517
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
1618
<PrivateAssets>all</PrivateAssets>
1719
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1820
</PackageReference>
21+
<PackageReference Include="MinVer" Version="2.5.0">
22+
<PrivateAssets>all</PrivateAssets>
23+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
24+
</PackageReference>
1925
<PackageReference Include="PCAxis.Menu" Version="1.0.1" />
2026
<PackageReference Include="PCAxis.Menu.MsSqlDatamodelMenu" Version="1.0.1" />
2127
<PackageReference Include="PCAxis.Menu.OracleDatamodelMenu" Version="1.0.1" />

0 commit comments

Comments
 (0)