diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 959c781..8631052 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,6 @@ on: jobs: build: - runs-on: ubuntu-latest steps: @@ -23,7 +22,6 @@ jobs: dotnet-version: 5.0.x - name: Nuke - run: ./build.sh publish --github-token $GITHUB_TOKEN --nuget-api-key $NUGET_AUTH_TOKEN + run: ./build.sh publish --nuget-api-key $NUGET_AUTH_TOKEN env: NUGET_AUTH_TOKEN: ${{secrets.NUGET_API_KEY}} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/build/Build.cs b/build/Build.cs index 11dd6fb..e980b75 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -24,9 +24,6 @@ class Build : NukeBuild [Parameter] readonly string NugetApiKey; - [Parameter] - readonly string GitHubToken; - [Solution] readonly Solution Solution; [GitRepository] readonly GitRepository GitRepository; [GitVersion(Framework = "netcoreapp3.1", UpdateBuildNumber = true)] readonly GitVersion GitVersion; @@ -95,28 +92,9 @@ class Build : NukeBuild .DependsOn(Pack) .Executes(() => { - if (GitRepository.IsOnDevelopBranch() || GitRepository.IsOnReleaseBranch()) - { - DotNetNuGetPush(p => p - .SetTargetPath(OutputDirectory / "*.nupkg") - .SetSource("https://nuget.pkg.github.com/rena0157/index.json") - .SetApiKey(GitHubToken)); - } - else if (GitRepository.Branch?.EqualsOrdinalIgnoreCase("main") ?? false) - { - DotNetNuGetPush(p => p - .SetTargetPath(OutputDirectory / "*.nupkg") - .SetSource("https://api.nuget.org/v3/index.json") - .SetApiKey(NugetApiKey)); - - DotNetNuGetPush(p => p - .SetTargetPath(OutputDirectory / "*.nupkg") - .SetSource("https://nuget.pkg.github.com/rena0157/index.json") - .SetApiKey(GitHubToken)); - } - else - { - Logger.Log(LogLevel.Normal, "No packages where released"); - } + DotNetNuGetPush(p => p + .SetTargetPath(OutputDirectory / "*.nupkg") + .SetSource("https://api.nuget.org/v3/index.json") + .SetApiKey(NugetApiKey)); }); } \ No newline at end of file