diff --git a/.github/workflows/build-publish-nuget.yml b/.github/workflows/build-publish-nuget.yml index 04191b3..af9aed2 100644 --- a/.github/workflows/build-publish-nuget.yml +++ b/.github/workflows/build-publish-nuget.yml @@ -46,6 +46,15 @@ jobs: with: dotnet-version: '9.0.x' + - name: Add GitHub Packages source + run: | + dotnet nuget remove source github || true + dotnet nuget add source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \ + --name github \ + --username "${{ github.actor }}" \ + --password "${{ secrets.GITHUB_TOKEN }}" \ + --store-password-in-clear-text + - name: Create SNK file from secret run: echo "${{ secrets.SNK_FILE_BASE64 }}" | base64 --decode > ${{ github.workspace }}/Autoredi.snk @@ -56,10 +65,15 @@ jobs: echo "version=$VERSION" >> $GITHUB_OUTPUT echo "Extracted version: $VERSION" + - name: Restore Projects + run: | + dotnet restore "${{ env.MAIN_PROJECT_FILE }}" + dotnet restore "${{ env.GENERATOR_PROJECT_FILE }}" + - name: Build Projects run: | - dotnet build "${{ env.MAIN_PROJECT_FILE }}" --configuration "${{ env.CONFIGURATION }}" - dotnet build "${{ env.GENERATOR_PROJECT_FILE }}" --configuration "${{ env.CONFIGURATION }}" + dotnet build "${{ env.MAIN_PROJECT_FILE }}" --configuration "${{ env.CONFIGURATION }}" --no-restore + dotnet build "${{ env.GENERATOR_PROJECT_FILE }}" --configuration "${{ env.CONFIGURATION }}" --no-restore - name: Pack Projects run: | diff --git a/NuGet.config b/NuGet.config new file mode 100644 index 0000000..4d736c1 --- /dev/null +++ b/NuGet.config @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/Autoredi/Autoredi.csproj b/src/Autoredi/Autoredi.csproj index 725b9bb..80f5b22 100644 --- a/src/Autoredi/Autoredi.csproj +++ b/src/Autoredi/Autoredi.csproj @@ -3,7 +3,7 @@ net10.0 Autoredi - 0.4.0 + 0.4.1 true true