Skip to content

Commit

Permalink
Update Build
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisPulman committed May 18, 2024
1 parent 990ac34 commit 48b5d34
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/BuildDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down Expand Up @@ -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 }}
5 changes: 2 additions & 3 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Build>(x => x.Compile);
public static int Main() => Execute<Build>(x => x.Pack);

[GitRepository] readonly GitRepository Repository;
[Solution(GenerateProjects = true)] readonly Solution Solution;
Expand Down Expand Up @@ -71,7 +71,7 @@ partial class Build : NukeBuild
.SetRestore(false)));

Target Pack => _ => _
.After(Compile)
.DependsOn(Compile)
.Produces(PackagesDirectory / "*.nupkg")
.Executes(() =>
{
Expand All @@ -95,7 +95,6 @@ partial class Build : NukeBuild
});

Target Deploy => _ => _
.DependsOn(Pack)
.Requires(() => NuGetApiKey)
.Executes(() =>
{
Expand Down

0 comments on commit 48b5d34

Please sign in to comment.