Skip to content

Commit

Permalink
Update CI, .NET SDK, and .NET tools
Browse files Browse the repository at this point in the history
  • Loading branch information
jgiannuzzi committed Nov 13, 2024
1 parent 0f1bddf commit 73561e8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
5 changes: 3 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
"isRoot": true,
"tools": {
"dotnet-format": {
"version": "5.0.211103",
"version": "5.1.250801",
"commands": [
"dotnet-format"
]
],
"rollForward": false
}
}
}
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ updates:
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
28 changes: 14 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,36 @@ jobs:
# Enforces the consistency of code formatting using `.editorconfig` and the `dotnet-format` tool.
check-format:
if: github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: 5.0.201
dotnet-version: 8.0.404
- name: Pin .NET Core SDK
run: dotnet new globaljson --sdk-version 5.0.201
run: dotnet new globaljson --sdk-version 8.0.404
- name: Restore tools
run: dotnet tool restore
- name: Check format
run: dotnet format --check --folder T4.Build
run: dotnet tool run dotnet-format --check --folder T4.Build

build:
if: github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: 5.0.201
dotnet-version: 8.0.404
- name: Pin .NET Core SDK
run: dotnet new globaljson --sdk-version 5.0.201
run: dotnet new globaljson --sdk-version 8.0.404
- name: Create package
shell: pwsh
run: |
Expand All @@ -55,18 +55,18 @@ jobs:
}
dotnet pack --configuration=Release @params
- name: Upload NuGet package artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: nuget-package
path: T4.Build/bin/Release/T4.Build.*.nupkg

publish:
if: startsWith(github.ref, 'refs/tags/v')
needs: [check-format, build]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Download NuGet package artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: nuget-package
- name: Publish to NuGet
Expand Down

0 comments on commit 73561e8

Please sign in to comment.