From 48b5d3437dd652214f1b2e79354423e2733be225 Mon Sep 17 00:00:00 2001 From: Chris Pulman Date: Sat, 18 May 2024 14:14:07 +0100 Subject: [PATCH] Update Build --- .github/workflows/BuildDeploy.yml | 13 ++++++------- build/Build.cs | 5 ++--- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/BuildDeploy.yml b/.github/workflows/BuildDeploy.yml index a1c6155..cb59466 100644 --- a/.github/workflows/BuildDeploy.yml +++ b/.github/workflows/BuildDeploy.yml @@ -55,8 +55,9 @@ jobs: .nuke/temp ~/.nuget/packages key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }} - - name: 'Run: Compile' - run: ./build.cmd Compile + + - name: 'Run: Compile Pack' + run: ./build.cmd Pack env: NuGetApiKey: ${{ secrets.NUGET_API_KEY }} @@ -90,9 +91,7 @@ jobs: body: | ${{ steps.changelog.outputs.commitLog }} - - name: NuGet Push + - name: 'Run: Deploy' + run: ./build.cmd Deploy env: - NUGET_AUTH_TOKEN: ${{ secrets.NUGET_API_KEY }} - SOURCE_URL: https://api.nuget.org/v3/index.json - run: | - dotnet nuget push -s ${{ env.SOURCE_URL }} -k ${{ env.NUGET_AUTH_TOKEN }} **/*.nupkg + NuGetApiKey: ${{ secrets.NUGET_API_KEY }} diff --git a/build/Build.cs b/build/Build.cs index a3924df..ce7ba31 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -33,7 +33,7 @@ partial class Build : NukeBuild //// - Microsoft VisualStudio https://nuke.build/visualstudio //// - Microsoft VSCode https://nuke.build/vscode - public static int Main() => Execute(x => x.Compile); + public static int Main() => Execute(x => x.Pack); [GitRepository] readonly GitRepository Repository; [Solution(GenerateProjects = true)] readonly Solution Solution; @@ -71,7 +71,7 @@ partial class Build : NukeBuild .SetRestore(false))); Target Pack => _ => _ - .After(Compile) + .DependsOn(Compile) .Produces(PackagesDirectory / "*.nupkg") .Executes(() => { @@ -95,7 +95,6 @@ partial class Build : NukeBuild }); Target Deploy => _ => _ - .DependsOn(Pack) .Requires(() => NuGetApiKey) .Executes(() => {