From 2b70ae4749c24e896be72a7aadf2b50efd23dc7b Mon Sep 17 00:00:00 2001 From: Marko Lahma Date: Tue, 31 Oct 2023 20:41:21 +0200 Subject: [PATCH] Add GH Actions ubuntu-latest build job (#1644) --- .github/workflows/build.yml | 22 ++++++++++++++++++++++ .github/workflows/pr.yml | 14 ++++++++++++++ build/Build.CI.GitHubActions.cs | 6 ++---- 3 files changed, 38 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d11635661..633ae5581 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,3 +51,25 @@ jobs: with: name: artifacts path: artifacts + ubuntu-latest: + name: ubuntu-latest + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: 'Cache: .nuke/temp, ~/.nuget/packages' + uses: actions/cache@v3 + with: + path: | + .nuke/temp + ~/.nuget/packages + key: ${{ runner.os }}-${{ hashFiles('global.json', 'src/**/*.csproj', 'src/**/package.json') }} + - name: 'Run: Compile, Test, Pack, Publish' + run: ./build.cmd Compile Test Pack Publish + env: + NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} + MYGET_API_KEY: ${{ secrets.MYGET_API_KEY }} + - name: 'Publish: artifacts' + uses: actions/upload-artifact@v3 + with: + name: artifacts + path: artifacts diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 9b2d1d83e..2ae90d48c 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -40,3 +40,17 @@ jobs: key: ${{ runner.os }}-${{ hashFiles('global.json', 'src/**/*.csproj', 'src/**/package.json') }} - name: 'Run: Compile, Test, Pack' run: ./build.cmd Compile Test Pack + ubuntu-latest: + name: ubuntu-latest + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: 'Cache: .nuke/temp, ~/.nuget/packages' + uses: actions/cache@v3 + with: + path: | + .nuke/temp + ~/.nuget/packages + key: ${{ runner.os }}-${{ hashFiles('global.json', 'src/**/*.csproj', 'src/**/package.json') }} + - name: 'Run: Compile, Test, Pack' + run: ./build.cmd Compile Test Pack diff --git a/build/Build.CI.GitHubActions.cs b/build/Build.CI.GitHubActions.cs index 07782e1b3..1984d2c2f 100644 --- a/build/Build.CI.GitHubActions.cs +++ b/build/Build.CI.GitHubActions.cs @@ -3,8 +3,7 @@ [GitHubActionsAttribute( "pr", GitHubActionsImage.WindowsLatest, - //GitHubActionsImage.UbuntuLatest, - //GitHubActionsImage.MacOsLatest, + GitHubActionsImage.UbuntuLatest, OnPullRequestBranches = new[] { "master", "main" }, OnPullRequestIncludePaths = new[] { "**/*.*" }, OnPullRequestExcludePaths = new[] { "**/*.md" }, @@ -15,8 +14,7 @@ [GitHubActionsAttribute( "build", GitHubActionsImage.WindowsLatest, - //GitHubActionsImage.UbuntuLatest, - //GitHubActionsImage.MacOsLatest, + GitHubActionsImage.UbuntuLatest, OnPushBranches = new[] { "master", "main" }, OnPushTags = new[] { "v*.*.*", "v*.*.*-*" }, OnPushIncludePaths = new[] { "**/*.*" },