Skip to content

Commit

Permalink
Publish to nuget CI
Browse files Browse the repository at this point in the history
  • Loading branch information
gloomweaver committed Jun 23, 2024
1 parent 5a379fb commit 477f72b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish to NuGet

on:
push:
tags:
- 'v*.*.*' # Triggers on version tags

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.x' # Adjust the version to your project

- name: Restore dependencies
run: dotnet restore

- name: Build the project
run: dotnet build --configuration Release --no-restore

- name: Pack the project
run: dotnet pack --configuration Release --no-restore --output ./artifacts

- name: Publish to NuGet
run: dotnet nuget push ./artifacts/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
2 changes: 2 additions & 0 deletions Spice/Spice.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<LangVersion>11.0</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Version>0.1.0</Version>
<Description>SpiceAI Dotnet SDK</Description>
<Authors>SpiceAI OSS</Authors>
<Nullable>enable</Nullable>
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
</PropertyGroup>
Expand Down

0 comments on commit 477f72b

Please sign in to comment.