File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ on :
2+ push :
3+ tags :
4+ - " v[0-9]+.[0-9]+.[0-9]+"
5+ jobs :
6+ build :
7+ runs-on : ubuntu-latest
8+ timeout-minutes : 15
9+ steps :
10+ - name : Checkout
11+ uses : actions/checkout@v2
12+ - name : Verify commit exists in origin/main
13+ run : |
14+ git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
15+ git branch --remote --contains | grep origin/main
16+ - name : Set VERSION variable from tag
17+ run : echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
18+ - name : Build
19+ run : dotnet build --configuration Release /p:Version=${VERSION}
20+ - name : Test
21+ run : dotnet test --configuration Release /p:Version=${VERSION} --no-build
22+ - name : Pack
23+ run : dotnet pack --configuration Release /p:Version=${VERSION} --no-build --output .
24+ - name : Push
25+ run : dotnet nuget push NuGet.Workflow.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGET_API_KEY}
26+ env :
27+ NUGET_API_KEY : ${{ secrets.NUGET_API_KEY }}
Original file line number Diff line number Diff line change 1111 <GeneratePackageOnBuild >true</GeneratePackageOnBuild >
1212 </PropertyGroup >
1313
14+ <PropertyGroup >
15+ <PackageId >NuGet.Workflow</PackageId >
16+ <RepositoryType >git</RepositoryType >
17+ <RepositoryUrl >https://github.com/xeofd/Xeofd.MongoDbExtension</RepositoryUrl >
18+ </PropertyGroup >
19+
1420 <ItemGroup >
1521 <PackageReference Include =" Microsoft.Extensions.Configuration" Version =" 9.0.6" />
1622 <PackageReference Include =" Microsoft.Extensions.DependencyInjection.Abstractions" Version =" 9.0.6" />
You can’t perform that action at this time.
0 commit comments