From 62047aacf2c521e62c80cb38f37db9e21cc56958 Mon Sep 17 00:00:00 2001 From: Jake Minard Date: Mon, 16 Dec 2024 12:16:28 -0500 Subject: [PATCH 1/2] Create nuget-publish.yml Created Nuget publish action. --- .github/workflows/nuget-publish.yml | 38 +++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/nuget-publish.yml diff --git a/.github/workflows/nuget-publish.yml b/.github/workflows/nuget-publish.yml new file mode 100644 index 0000000..f49c008 --- /dev/null +++ b/.github/workflows/nuget-publish.yml @@ -0,0 +1,38 @@ +name: Nuget Publish + +on: + workflow_dispatch: + +env: + NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +jobs: + Publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Git Semantic Version + id: semver + uses: PaulHatch/semantic-version@v5.4.0 + - name: Create Tag + id: tag_version + uses: mathieudutour/github-tag-action@v6.2 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + custom_tag: ${{ steps.semver.outputs.version }} + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + - name: Restore dependencies + run: dotnet restore ./Optimizely.Graph.Source.Sdk/Optimizely.Graph.Source.Sdk.sln + - name: Build + run: dotnet build --no-restore ./Optimizely.Graph.Source.Sdk/Optimizely.Graph.Source.Sdk.sln + - name: Package + run: dotnet pack ./Optimizely.Graph.Source.Sdk/Optimizely.Graph.Source.Sdk/Optimizely.Graph.Source.Sdk.csproj --configuration Release -p:PackageVersion=${{ steps.semver.outputs.version }} + - name: Publish to Optimizely + run: dotnet nuget push ./Optimizely.Graph.Source.Sdk/Optimizely.Graph.Source.Sdk/bin/Release/Optimizely.Graph.Source.Sdk.${{ steps.semver.outputs.version }}.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.optimizely.com/feed/packages.svc + - name: Publish to Episerver + run: dotnet nuget push ./Optimizely.Graph.Source.Sdk/Optimizely.Graph.Source.Sdk/bin/Release/Optimizely.Graph.Source.Sdk.${{ steps.semver.outputs.version }}.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/episerver/index.json From 553029e520d92331355a8587aa2a3eef242d0a8a Mon Sep 17 00:00:00 2001 From: jakeminard Date: Mon, 16 Dec 2024 12:33:09 -0500 Subject: [PATCH 2/2] Updates to project settings. --- .../Optimizely.Graph.Source.Sdk.csproj | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Optimizely.Graph.Source.Sdk/Optimizely.Graph.Source.Sdk/Optimizely.Graph.Source.Sdk.csproj b/Optimizely.Graph.Source.Sdk/Optimizely.Graph.Source.Sdk/Optimizely.Graph.Source.Sdk.csproj index 13220ec..4ebf239 100644 --- a/Optimizely.Graph.Source.Sdk/Optimizely.Graph.Source.Sdk/Optimizely.Graph.Source.Sdk.csproj +++ b/Optimizely.Graph.Source.Sdk/Optimizely.Graph.Source.Sdk/Optimizely.Graph.Source.Sdk.csproj @@ -4,6 +4,11 @@ net8.0 enable enable + Optimizely + C# SDK for Content Graph Services api. + https://github.com/episerver/graph-source-sdk + README.md + https://github.com/episerver/graph-source-sdk @@ -12,6 +17,13 @@ + + + True + \ + + +