From 23cb056b019f856a6063ef6b54c81eb09a5c85ef Mon Sep 17 00:00:00 2001 From: Dennis Dyatlov Date: Tue, 26 Nov 2024 16:49:35 +0000 Subject: [PATCH] fix nuget sources setup --- .github/workflows/net-ci.yml | 5 ++++- .github/workflows/net-release.yml | 16 ++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/net-ci.yml b/.github/workflows/net-ci.yml index d5386740..163acae0 100644 --- a/.github/workflows/net-ci.yml +++ b/.github/workflows/net-ci.yml @@ -34,7 +34,7 @@ jobs: with: dotnet-version: 8.0.x - - name: Restore Solution + - name: Set Up NuGet Sources run: | NUGET_SOURCE_URL="https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" dotnet nuget remove source ${{ github.repository_owner }}-github || true @@ -43,6 +43,9 @@ jobs: --username "${{ github.workflow }}" \ --password ${{ secrets.GITHUB_TOKEN }} \ --store-password-in-clear-text + + - name: Restore Solution + run: | dotnet restore - name: Build Solution diff --git a/.github/workflows/net-release.yml b/.github/workflows/net-release.yml index b85063c8..5bdc53e6 100644 --- a/.github/workflows/net-release.yml +++ b/.github/workflows/net-release.yml @@ -145,6 +145,16 @@ jobs: pattern: native_client_gen_* merge-multiple: true + - name: Set Up NuGet Sources + run: | + NUGET_SOURCE_URL="https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" + dotnet nuget remove source ${{ github.repository_owner }}-github || true + dotnet nuget add source $NUGET_SOURCE_URL \ + --name ${{ github.repository_owner }}-github \ + --username "${{ github.workflow }}" \ + --password ${{ secrets.GITHUB_TOKEN }} \ + --store-password-in-clear-text + - name: Build Solution run: | dotnet build --configuration Release -p:LibraryRoot=${{ github.workspace }}/native_client_gens @@ -168,11 +178,5 @@ jobs: - name: Publish NuGet Packages run: | - NUGET_SOURCE_URL="https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" - dotnet nuget add source $NUGET_SOURCE_URL \ - --name ${{ github.repository_owner }}-github \ - --username "${{ github.workflow }}" \ - --password ${{ secrets.GITHUB_TOKEN }} \ - --store-password-in-clear-text dotnet nuget push ./nugets/*.nupkg \ --source $NUGET_SOURCE_URL