File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Release to NuGet
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*.*.*' # Matches stable versions like v1.2.3
7+ - ' v*.*.*-*' # Matches pre-release versions like v2.0.1-beta
8+
9+ jobs :
10+ build-and-release :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v4
16+
17+ - name : Setup .NET
18+ uses : actions/setup-dotnet@v4
19+ with :
20+ dotnet-version : ' 8.0.x' # Adjust to your .NET version
21+
22+ - name : Restore dependencies
23+ run : dotnet restore ./src/DataStax.AstraDB.DataApi/
24+
25+ - name : Build
26+ run : dotnet build ./src/DataStax.AstraDB.DataApi/ --configuration Release --no-restore
27+
28+ - name : Pack
29+ run : dotnet pack ./src/DataStax.AstraDB.DataApi/ --configuration Release --no-build --output nupkgs -p:Version=${{ env.PACKAGE_VERSION }}
30+ env :
31+ PACKAGE_VERSION : ${{ replace(github.ref_name, 'v', '') }}
32+
33+ # - name: Push to NuGet
34+ # run: dotnet nuget push nupkgs/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json
35+ # env:
36+ # NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
37+
38+ - name : Dry-run NuGet push
39+ run : echo "Would run: dotnet nuget push nupkgs/*.nupkg --api-key [REDACTED] --source https://api.nuget.org/v3/index.json"
40+
41+ - name : Upload NuGet package as artifact
42+ uses : actions/upload-artifact@v4
43+ with :
44+ name : nuget-package
45+ path : nupkgs/*.nupkg
46+ retention-days : 1
You can’t perform that action at this time.
0 commit comments