Skip to content

Commit

Permalink
Get build running on Linux and MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
lahma committed Dec 4, 2021
1 parent acdb04f commit a08c020
Show file tree
Hide file tree
Showing 3 changed files with 126 additions and 4 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,73 @@ jobs:
with:
name: artifacts
path: artifacts
ubuntu-latest:
name: ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.1.*
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.*
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.*
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.*
- name: Cache .nuke/temp, ~/.nuget/packages
uses: actions/cache@v2
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('global.json', 'src/**/*.csproj', 'src/**/package.json') }}
- name: Run './build.cmd InstallDependencies Compile Test Pack Publish'
run: ./build.cmd InstallDependencies Compile Test Pack Publish
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
MYGET_API_KEY: ${{ secrets.MYGET_API_KEY }}
CHOCO_API_KEY: ${{ secrets.CHOCO_API_KEY }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- uses: actions/upload-artifact@v1
with:
name: artifacts
path: artifacts
macOS-latest:
name: macOS-latest
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.1.*
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.*
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.*
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.*
- name: Cache .nuke/temp, ~/.nuget/packages
uses: actions/cache@v2
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('global.json', 'src/**/*.csproj', 'src/**/package.json') }}
- name: Run './build.cmd InstallDependencies Compile Test Pack Publish'
run: ./build.cmd InstallDependencies Compile Test Pack Publish
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
MYGET_API_KEY: ${{ secrets.MYGET_API_KEY }}
CHOCO_API_KEY: ${{ secrets.CHOCO_API_KEY }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- uses: actions/upload-artifact@v1
with:
name: artifacts
path: artifacts
52 changes: 52 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,55 @@ jobs:
key: ${{ runner.os }}-${{ hashFiles('global.json', 'src/**/*.csproj', 'src/**/package.json') }}
- name: Run './build.cmd InstallDependencies Compile Test Pack'
run: ./build.cmd InstallDependencies Compile Test Pack
ubuntu-latest:
name: ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.1.*
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.*
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.*
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.*
- name: Cache .nuke/temp, ~/.nuget/packages
uses: actions/cache@v2
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('global.json', 'src/**/*.csproj', 'src/**/package.json') }}
- name: Run './build.cmd InstallDependencies Compile Test Pack'
run: ./build.cmd InstallDependencies Compile Test Pack
macOS-latest:
name: macOS-latest
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.1.*
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.*
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.*
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.*
- name: Cache .nuke/temp, ~/.nuget/packages
uses: actions/cache@v2
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('global.json', 'src/**/*.csproj', 'src/**/package.json') }}
- name: Run './build.cmd InstallDependencies Compile Test Pack'
run: ./build.cmd InstallDependencies Compile Test Pack
8 changes: 4 additions & 4 deletions build/Build.CI.GitHubActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
[CustomGitHubActionsAttribute(
"pr",
GitHubActionsImage.WindowsLatest,
// GitHubActionsImage.UbuntuLatest,
// GitHubActionsImage.MacOsLatest,
GitHubActionsImage.UbuntuLatest,
GitHubActionsImage.MacOsLatest,
OnPullRequestBranches = new[] { "master", "main" },
OnPullRequestIncludePaths = new[] { "**/*.*" },
OnPullRequestExcludePaths = new[] { "**/*.md" },
Expand All @@ -19,8 +19,8 @@
[CustomGitHubActionsAttribute(
"build",
GitHubActionsImage.WindowsLatest,
// GitHubActionsImage.UbuntuLatest,
// GitHubActionsImage.MacOsLatest,
GitHubActionsImage.UbuntuLatest,
GitHubActionsImage.MacOsLatest,
OnPushBranches = new[] { "master", "main" },
OnPushTags = new[] { "v*.*.*" },
OnPushIncludePaths = new[] { "**/*.*" },
Expand Down

0 comments on commit a08c020

Please sign in to comment.