Skip to content

Commit 25f65fc

Browse files
author
Martin Boje Carpentier
committed
Only .net core 3.1 is needed to build .net standard
1 parent d2a59b6 commit 25f65fc

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,18 @@ jobs:
2424
runs-on: windows-2019
2525

2626
steps:
27-
- uses: actions/checkout@v2
27+
- name: Validate release version
28+
run: |
29+
$VERSION=${env:GITHUB_REF_NAME}
30+
if($VERSION[0] -eq "v"){
31+
$VERSION=$VERSION.substring(1)
32+
}
33+
if(!($VERSION -match ${env:NUGET_VERSIONING_REGEX})) {
34+
throw "Release tag did not contain a valid NUGET version. TAG was : ${env:GITHUB_REF_NAME}"
35+
}
36+
echo "Version to use is - $VERSION"
37+
echo "RELEASE_VERSION=$VERSION" | Out-File -FilePath ${env:GITHUB_ENV} -Append
38+
- uses: actions/checkout@v2
2839
- name: Setup .NET Core
2940
uses: actions/setup-dotnet@v1
3041
with:
@@ -37,15 +48,6 @@ jobs:
3748
- name: Build solution
3849
run: dotnet build src/${{ env.PROJECT_NAME }}.sln -c Release --no-restore
3950
- name: Create Release NuGet package
40-
run: |
41-
$VERSION=${env:GITHUB_REF_NAME}
42-
if($VERSION[0] -eq "v"){
43-
$VERSION=$VERSION.substring(1)
44-
}
45-
46-
if(!($VERSION -match ${env:NUGET_VERSIONING_REGEX})) {
47-
throw "Release tag did not contain a valid NUGET version. TAG was : ${env:GITHUB_REF_NAME}"
48-
}
49-
dotnet pack -v normal -c Release --include-symbols --include-source -p:PackageVersion=$VERSION -o nupkg src/${{ env.PROJECT_NAME }}/${{ env.PROJECT_NAME }}.csproj
51+
run: dotnet pack -v normal -c Release --include-symbols --include-source -p:PackageVersion=${{ env.RELEASE_VERSION }} -o nupkg src/${{ env.PROJECT_NAME }}/${{ env.PROJECT_NAME }}.csproj
5052
- name: Push to Nuget
51-
run: dotnet nuget push "./nupkg/${{ env.PROJECT_NAME }}.$VERSION.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_KEY}} --skip-duplicate
53+
run: dotnet nuget push "./nupkg/${{ env.PROJECT_NAME }}.${{ env.RELEASE_VERSION }}.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_KEY}} --skip-duplicate

src/GeoJSON.Text.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
99
..\.github\workflows\continous-benchmark.yml = ..\.github\workflows\continous-benchmark.yml
1010
..\LICENSE.md = ..\LICENSE.md
1111
..\README.md = ..\README.md
12+
..\.github\workflows\release.yml = ..\.github\workflows\release.yml
1213
EndProjectSection
1314
EndProject
1415
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeoJSON.Text", "GeoJSON.Text\GeoJSON.Text.csproj", "{ECD95D99-8429-4358-92AE-1C51061D774C}"

0 commit comments

Comments
 (0)