Skip to content

Commit 34776ee

Browse files
committed
Updated the GH workflows
to conform to the ones we're using in the other projects
1 parent da21467 commit 34776ee

File tree

2 files changed

+42
-19
lines changed

2 files changed

+42
-19
lines changed

.github/workflows/build.yml

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,33 @@ name: Build
22

33
on:
44
push:
5+
branches:
6+
- master
7+
- develop
8+
- "feature/**"
9+
- "release/**"
10+
- "hotfix/**"
11+
tags:
12+
- "*"
513
paths-ignore:
614
- "README.md"
715
pull_request:
816

917
jobs:
1018
build:
1119
runs-on: ${{ matrix.os }}
12-
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
1320
strategy:
1421
matrix:
15-
os: [windows-latest, ubuntu-latest, macos-latest]
22+
os: [windows-2022, ubuntu-22.04, macos-12]
1623

1724
env:
1825
AZURE_PASSWORD: ${{ secrets.AZURE_PASSWORD }}
1926
AZURE_SOURCE: ${{ secrets.AZURE_SOURCE }}
2027
AZURE_USER: ${{ secrets.AZURE_USER }}
2128
GITHUB_PAT: ${{ secrets.GH_TOKEN }}
22-
GITTER_ROOM_ID: ${{ secrets.GITTER_ROOM_ID }}
2329
GPR_PASSWORD: ${{ secrets.GPR_PASSWORD }}
2430
GPR_SOURCE: ${{ secrets.GPR_SOURCE }}
2531
GPR_USER: ${{ secrets.GPR_USER }}
26-
GITTER_TOKEN: ${{ secrets.GITTER_TOKEN }}
2732
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
2833
NUGET_SOURCE: "https://api.nuget.org/v3/index.json"
2934
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
@@ -33,38 +38,56 @@ jobs:
3338
WYAM_ACCESS_TOKEN: ${{ secrets.WYAM_ACCESS_TOKEN }}
3439
WYAM_DEPLOY_BRANCH: "gh-pages"
3540
WYAM_DEPLOY_REMOTE: ${{ github.event.repository.html_url }}
41+
3642
steps:
3743
- name: Checkout the repository
38-
uses: actions/checkout@v2
44+
uses: actions/checkout@v4
3945

4046
- name: Fetch all tags and branches
4147
run: git fetch --prune --unshallow
4248

4349
- name: Cache Tools
44-
uses: actions/cache@v2
50+
uses: actions/cache@v4
4551
with:
4652
path: tools
47-
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}
53+
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake', '.config/dotnet-tools.json') }}
54+
55+
# install libgit2-dev on ubuntu, so libgit2sharp works
56+
- name: Install libgit-dev
57+
if: runner.os == 'Linux'
58+
run: sudo apt-get install -y libgit2-dev
59+
60+
- name: Setup required dotnet versions
61+
uses: actions/[email protected]
62+
with:
63+
dotnet-version: |
64+
2.1.818
65+
3.1.x
66+
5.0.x
67+
6.0.x
68+
7.0.x
69+
8.0.x
4870
4971
- name: Build project
50-
uses: cake-build/cake-action@v1
72+
uses: cake-build/cake-action@v2.0.0
5173
with:
5274
script-path: recipe.cake
5375
target: CI
5476
verbosity: Normal
55-
cake-version: 0.38.5
77+
cake-version: tool-manifest
5678
cake-bootstrap: true
5779

5880
- name: Upload Issues-Report
59-
uses: actions/upload-artifact@v2
81+
uses: actions/upload-artifact@v4
6082
with:
6183
if-no-files-found: warn
62-
name: issues
84+
name: ${{ matrix.os }} Issues
6385
path: BuildArtifacts/report.html
6486

6587
- name: Upload Packages
66-
uses: actions/upload-artifact@v2
88+
if: runner.os == 'Windows'
89+
uses: actions/upload-artifact@v4
6790
with:
6891
if-no-files-found: warn
6992
name: package
70-
path: BuildArtifacts/Packages/**/*
93+
path: BuildArtifacts/Packages/**/*

.github/workflows/release-notes.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ jobs:
1111

1212
steps:
1313
- name: Checkout the requested branch
14-
uses: actions/checkout@v2.3.4
14+
uses: actions/checkout@v4
1515
- name: Fetch all tags and branches
1616
run: git fetch --prune --unshallow
1717
- name: Cache Tools
18-
uses: actions/cache@v2.1.4
18+
uses: actions/cache@v4
1919
with:
2020
path: tools
21-
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}
21+
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake', '.config/dotnet-tools.json') }}
2222
- name: Set up git version
2323
if: ${{ !contains(github.ref, '/hotfix/') && !contains(github.ref, '/release/') }}
2424
uses: gittools/actions/gitversion/[email protected]
@@ -38,10 +38,10 @@ jobs:
3838
branch: "release/${{ steps.gitversion.outputs.majorMinorPatch }}"
3939
github_token: ${{ secrets.GH_TOKEN }}
4040
- name: Drafting Release Notes
41-
uses: cake-build/cake-action@v1
41+
uses: cake-build/cake-action@@v2.0.0
4242
with:
4343
script-path: recipe.cake
4444
target: releasenotes
45-
verbosity: Diagnostic
46-
cake-version: 0.38.5
45+
verbosity: Normal
46+
cake-version: tool-manifest
4747
cake-bootstrap: true

0 commit comments

Comments
 (0)