Skip to content

Commit

Permalink
disable autogeneration of github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Barsonax committed May 12, 2024
1 parent 1a04685 commit 23b3827
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,24 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: 'Cache: .nuke/temp, ~/.nuget/packages, **/obj/*, **/node_modules'
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Cache npm packages
id: cache-npm
uses: actions/cache@v3
with:
path: |
**/node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json', '.nvmrc') }}
- name: Cache nuget packages
id: cache-nuget
uses: actions/cache@v3
with:
path: |
.nuke/temp
~/.nuget/packages
**/obj/*
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Build.props', '**/package-lock.json', '.nvmrc') }}
key: ${{ runner.os }}-nuget_obj-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Build.props') }}
- name: 'Run: Test, VerifyStyle'
run: ./build.cmd Test VerifyStyle
18 changes: 9 additions & 9 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@
using static Nuke.Common.IO.PathConstruction;
using static Nuke.Common.Tools.DotNet.DotNetTasks;

[GitHubActions("Build and test", GitHubActionsImage.Ubuntu2204,
OnPushBranches = ["master", "feature/*"],
OnPushIncludePaths = ["**/*"],
OnPushExcludePaths = ["**.md"],
InvokedTargets = [nameof(Test), nameof(VerifyStyle)],
CacheKeyFiles = ["**/global.json", "**/*.csproj", "**/Directory.Build.props", "**/package-lock.json", ".nvmrc"],
CacheIncludePatterns = [".nuke/temp", "~/.nuget/packages", "**/obj/*", "**/node_modules"],
CacheExcludePatterns = new string[0])]
//[GitHubActions("Build and test", GitHubActionsImage.Ubuntu2204,
// OnPushBranches = ["master", "feature/*"],
// OnPushIncludePaths = ["**/*"],
// OnPushExcludePaths = ["**.md"],
// InvokedTargets = [nameof(Test), nameof(VerifyStyle)],
// CacheKeyFiles = ["**/global.json", "**/*.csproj", "**/Directory.Build.props", "**/package-lock.json", ".nvmrc"],
// CacheIncludePatterns = [".nuke/temp", "~/.nuget/packages", "**/obj/*", "**/node_modules"],
// CacheExcludePatterns = [])]
class Build : NukeBuild
{
public static int Main() => Execute<Build>(x => x.Compile);

[Solution]
readonly Solution Solution;
readonly Solution Solution;

[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;
Expand Down

0 comments on commit 23b3827

Please sign in to comment.