diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3321eb3..006ebe7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,11 +21,13 @@ jobs: - name: Build .NET Solution run: dotnet build --configuration Release --no-restore - name: Pack .NET Solution - run: dotnet pack --no-build --output pack/ + run: dotnet pack --configuration Release --no-build --output pack/ - name: Publish .NET Solution to GitHub Packages continue-on-error: true run: dotnet nuget push pack/* --api-key ${{ secrets.GITHUB_TOKEN }} --source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" - name: Publish .NET Solution to NuGet.org - continue-on-error: true + env: + apikey: ${{ secrets.NUGET_ORG_KEY }} + if: ${{ env.apikey != '' }} run: dotnet nuget push pack/* --api-key ${{ secrets.NUGET_ORG_KEY }} --source nuget - + continue-on-error: true diff --git a/Directory.Build.props b/Directory.Build.props index d5abf88..e1822af 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,4 +4,8 @@ git https://github.com/escendit/Escendit.Tools.SourceLink.GitHub + + + https://github.com/$(GITHUB_REPOSITORY) + diff --git a/src/Escendit.Tools.SourceLink.GitHub/Escendit.Tools.SourceLink.GitHub.csproj b/src/Escendit.Tools.SourceLink.GitHub/Escendit.Tools.SourceLink.GitHub.csproj index d020c06..760bfa5 100644 --- a/src/Escendit.Tools.SourceLink.GitHub/Escendit.Tools.SourceLink.GitHub.csproj +++ b/src/Escendit.Tools.SourceLink.GitHub/Escendit.Tools.SourceLink.GitHub.csproj @@ -11,7 +11,7 @@ sourcelink;source;link;github;defaults - + diff --git a/src/Escendit.Tools.SourceLink.GitHub/Escendit.Tools.SourceLink.GitHub.props b/src/Escendit.Tools.SourceLink.GitHub/Escendit.Tools.SourceLink.GitHub.props index 35d6e09..b740d36 100644 --- a/src/Escendit.Tools.SourceLink.GitHub/Escendit.Tools.SourceLink.GitHub.props +++ b/src/Escendit.Tools.SourceLink.GitHub/Escendit.Tools.SourceLink.GitHub.props @@ -3,6 +3,11 @@ true snupkg - true + + + + git + https://github.com/$(GITHUB_REPOSITORY) + true