Skip to content

Commit

Permalink
Only .net core 3.1 is needed to build .net standard
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Boje Carpentier committed Jan 26, 2022
1 parent d2a59b6 commit 4aea7e6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
28 changes: 15 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
# Official NuGet Feed settings
NUGET_FEED: https://api.nuget.org/v3/index.json
NUGET_KEY: ${{ secrets.NUGET_KEY }}
NUGET_VERSIONING_REGEX: "[0-9]+\\.[0-9]+\\.[0-9]+-[a-zA-Z]+"
NUGET_VERSIONING_REGEX: "[0-9]+\\.[0-9]+\\.[0-9]+(-[a-zA-Z]+)?"

jobs:
deploy:
Expand All @@ -24,7 +24,18 @@ jobs:
runs-on: windows-2019

steps:
- uses: actions/checkout@v2
- name: Validate release version
run: |
$VERSION=${env:GITHUB_REF_NAME}
if($VERSION[0] -eq "v"){
$VERSION=$VERSION.substring(1)
}
if(!($VERSION -match ${env:NUGET_VERSIONING_REGEX})) {
throw "Release tag did not contain a valid NUGET version. TAG was : ${env:GITHUB_REF_NAME}"
}
echo "Version to use is - $VERSION"
echo "RELEASE_VERSION=$VERSION" | Out-File -FilePath ${env:GITHUB_ENV} -Append
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
Expand All @@ -37,15 +48,6 @@ jobs:
- name: Build solution
run: dotnet build src/${{ env.PROJECT_NAME }}.sln -c Release --no-restore
- name: Create Release NuGet package
run: |
$VERSION=${env:GITHUB_REF_NAME}
if($VERSION[0] -eq "v"){
$VERSION=$VERSION.substring(1)
}
if(!($VERSION -match ${env:NUGET_VERSIONING_REGEX})) {
throw "Release tag did not contain a valid NUGET version. TAG was : ${env:GITHUB_REF_NAME}"
}
dotnet pack -v normal -c Release --include-symbols --include-source -p:PackageVersion=$VERSION -o nupkg src/${{ env.PROJECT_NAME }}/${{ env.PROJECT_NAME }}.csproj
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
- name: Push to Nuget
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
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
1 change: 1 addition & 0 deletions src/GeoJSON.Text.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
..\.github\workflows\continous-benchmark.yml = ..\.github\workflows\continous-benchmark.yml
..\LICENSE.md = ..\LICENSE.md
..\README.md = ..\README.md
..\.github\workflows\release.yml = ..\.github\workflows\release.yml
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeoJSON.Text", "GeoJSON.Text\GeoJSON.Text.csproj", "{ECD95D99-8429-4358-92AE-1C51061D774C}"
Expand Down

0 comments on commit 4aea7e6

Please sign in to comment.