Skip to content

Commit

Permalink
.NET 8.0 (#54)
Browse files Browse the repository at this point in the history
* Update to .NET 8.0

* Bump to 2.0.0
  • Loading branch information
MareMare authored Dec 9, 2023
1 parent 76590e5 commit c408a25
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 38 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: .NET Build & UnitTests
name: CI

on:
workflow_dispatch:
Expand All @@ -12,20 +12,20 @@ on:
- "src/**"

jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
osName: Windows
name: Test on ${{ matrix.osName }}
permissions:
contents: read
uses: MareMare/ReusableWorkflows/.github/workflows/ci.net7.yml@main
with:
runner-os: ${{ matrix.os }}
working-directory: src
testing-directory: src
run-unittest: 'true'
unittest-filter: 'Category!=local'
ci:
name: CI on windows
runs-on: windows-latest

steps:
- name: 🛒 Checkout
uses: actions/[email protected]
- name: ✨ Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: 🚚 Restore
run: dotnet restore src
- name: 🛠️ Build
run: dotnet build src --configuration Release --no-restore
- name: 🧪 Test
run: dotnet test src --configuration Release --no-build --verbosity normal --filter 'Category!=local'
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ jobs:
- name: 🛒 Checkout repository
uses: actions/checkout@v4

- name: ✨ Setup .NET 7.0
- name: ✨ Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

# Initializes the CodeQL tools for scanning.
- name: ✨ Initialize CodeQL
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/create-release-and-upload-asset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
with:
fetch-depth: 0

- name: ✨ Set up .NET 7.0
- name: ✨ Set up .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

# # https://github.community/t/how-to-get-just-the-tag-name/16241/17
# # ${{ steps.get_version.outputs.VERSION }}
Expand All @@ -32,12 +32,10 @@ jobs:
# shell: bash

- name: 🚚 Restore dependencies
working-directory: src
run: dotnet restore
run: dotnet restore src

- name: 🛠️ Build
working-directory: src
run: dotnet build --configuration Release --no-restore
run: dotnet build src --configuration Release --no-restore

- name: 🚀 Publish DummyFileCreator.App
run: dotnet publish --configuration Release -p:PublishProfile=FolderProfile .\src\DummyFileCreator.App\DummyFileCreator.App.csproj
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/DummyFileCreator.Console/bin/Debug/net6.0/DummyFileCreator.Console.dll",
"program": "${workspaceFolder}/src/DummyFileCreator.Console/bin/Debug/net8.0/DummyFileCreator.Console.dll",
"args": [],
"cwd": "${workspaceFolder}/src/DummyFileCreator.Console",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<!-- ソリューションに含まれるすべてのプロジェクトに共通のバージョンを設定します。-->
<PropertyGroup>
<Version>1.1.0</Version>
<Version>2.0.0</Version>
</PropertyGroup>

<!-- カスタムプロパティ -->
Expand Down
4 changes: 2 additions & 2 deletions src/DummyFileCreator.App/DummyFileCreator.App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
Expand All @@ -16,7 +16,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Platform>Any CPU</Platform>
<PublishDir>bin\publish\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net7.0-windows</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<ApplicationIcon>DummyFileCreator.ico</ApplicationIcon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Platform>Any CPU</Platform>
<PublishDir>bin\publish\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion src/DummyFileCreator/DummyFileCreator.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down

0 comments on commit c408a25

Please sign in to comment.