Skip to content

Commit

Permalink
Update to .NET 8.0 (#21)
Browse files Browse the repository at this point in the history
- Update references to .NET 6 to 8
- Update references to website to point at https://ghul.dev
- Add devcontainer config
- Update version bump job in CICD pipeline
  • Loading branch information
degory committed Jan 19, 2024
1 parent a4c7fab commit 2e93ca8
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 44 deletions.
7 changes: 7 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"image": "ghcr.io/degory/ghul/devcontainer:dotnet",
"containerUser": "vscode",
"extensions": [
"degory.ghul"
]
}
45 changes: 26 additions & 19 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,40 @@ env:
jobs:
version:
name: Create a version number
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
timeout-minutes: 1
outputs:
tag: ${{ steps.create_version.outputs.tag }}
package: ${{ steps.create_version.outputs.package }}

permissions:
contents: 'write'

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: '0'

- name: Create version
id: create_version
uses: degory/create-version@v0.0.1
uses: degory/create-version@v0.0.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
env:
PRERELEASE: ${{ github.event_name == 'pull_request' }}

test-console-application:
name: Test the console application in-situ
runs-on: ubuntu-latest

container:
image: mcr.microsoft.com/dotnet/sdk:6.0
image: mcr.microsoft.com/dotnet/sdk:8.0

timeout-minutes: 10
needs: [version]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: .NET tool restore
working-directory: templates/ghul-console
Expand Down Expand Up @@ -79,19 +86,19 @@ jobs:
runs-on: ubuntu-latest

container:
image: mcr.microsoft.com/dotnet/sdk:6.0
image: mcr.microsoft.com/dotnet/sdk:8.0

timeout-minutes: 10
needs: [version]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Create package
run: dotnet pack -p:Version=${{ needs.version.outputs.package }}

- name: Upload .NET package artefact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: package
path: nupkg
Expand All @@ -101,16 +108,16 @@ jobs:
runs-on: ubuntu-latest

container:
image: mcr.microsoft.com/dotnet/sdk:6.0
image: mcr.microsoft.com/dotnet/sdk:8.0

timeout-minutes: 10
needs: [version,build]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Download template package
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: package
path: nupkg
Expand Down Expand Up @@ -154,16 +161,16 @@ jobs:
runs-on: ubuntu-latest

container:
image: mcr.microsoft.com/dotnet/sdk:6.0
image: mcr.microsoft.com/dotnet/sdk:8.0

timeout-minutes: 10
needs: [version,build]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Download template package
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: package
path: nupkg
Expand Down Expand Up @@ -202,16 +209,16 @@ jobs:
runs-on: ubuntu-latest

container:
image: mcr.microsoft.com/dotnet/sdk:6.0
image: mcr.microsoft.com/dotnet/sdk:8.0

timeout-minutes: 10
needs: [test-console-template,test-classlib-template]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Download template package
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: package
path: nupkg
Expand All @@ -237,10 +244,10 @@ jobs:
if: ${{ github.event_name == 'push' }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Download package
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: package
path: nupkg
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
[![Release Date](https://img.shields.io/github/release-date/degory/ghul-templates)](https://github.com/degory/ghul-templates/releases)
[![Issues](https://img.shields.io/github/issues/degory/ghul-templates)](https://github.com/degory/ghul-templates/issues)
[![License](https://img.shields.io/github/license/degory/ghul-templates)](https://github.com/degory/ghul-templates/blob/main/LICENSE)
[![ghūl](https://img.shields.io/badge/gh%C5%ABl-100%25!-information)](https://ghul.io)
[![ghūl](https://img.shields.io/badge/gh%C5%ABl-100%25!-information)](https://ghul.dev)

These are ['dotnet new' templates](https://docs.microsoft.com/en-us/dotnet/core/tools/custom-templates) for quick-starting a .NET 6.0 console application or class library project written in the [ghūl programming language](https://ghul.io).
These are ['dotnet new' templates](https://docs.microsoft.com/en-us/dotnet/core/tools/custom-templates) for quick-starting a .NET 8.0 console application or class library project written in the [ghūl programming language](https://ghul.dev).

Note that these templates do not include things like GitHub Actions workflows, development container config, Dependabot config, unit tests, etc. For a GitHub repository template that does include all those things, see the [ghūl repository template](https://github.com/degory/ghul-repository-template) repo.

Expand Down Expand Up @@ -36,9 +36,9 @@ Hello world!

## Prerequisites

These templates create skeleton ghūl programming language projects that can be built on any host that supports the [.NET 6.0 SDK](https://dotnet.microsoft.com/download/dotnet/6.0)
These templates create skeleton ghūl programming language projects that can be built on any host that supports the [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet/8.0)

You'll need to either install the [.NET 6.0 SDK](https://dotnet.microsoft.com/download/dotnet/6.0), or use a container that includes it like the [ghūl development image](https://hub.docker.com/r/ghul/devcontainer/tags) or a recent Microsoft .NET SDK image
You'll need to either install the [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet/8.0), or use a container that includes it like the [ghūl development image](https://hub.docker.com/r/ghul/devcontainer/tags) or a recent Microsoft .NET SDK image

## Recommended

Expand Down
2 changes: 1 addition & 1 deletion ghul-templates.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageTags>ghul;ghūl;dotnet;.NET;template</PackageTags>
<NoDefaultExcludes>true</NoDefaultExcludes>

<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>

<IncludeContentInPack>true</IncludeContentInPack>
<IncludeBuildOutput>false</IncludeBuildOutput>
Expand Down
2 changes: 1 addition & 1 deletion templates/ghul-classlib/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"ghul.compiler": {
"version": "0.5.2",
"version": "0.6.5",
"commands": [
"ghul-compiler"
]
Expand Down
2 changes: 1 addition & 1 deletion templates/ghul-classlib/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ghul.targets" Version="1.2.0" />
<PackageReference Include="ghul.targets" Version="1.2.1" />
<PackageReference Include="ghul.pipes" Version="1.0.0" />
<PackageReference Include="ghul.runtime" Version="1.0.0" />
</ItemGroup>
Expand Down
6 changes: 1 addition & 5 deletions templates/ghul-classlib/ghul-classlib.ghulproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>

<PackageId>example.classlib</PackageId>

Expand All @@ -11,9 +11,5 @@

<ItemGroup>
<GhulSources Include="src/**/*.ghul" />

<PackageReference Include="ghul.runtime" />
<PackageReference Include="ghul.pipes" />
<PackageReference Include="ghul.targets" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion templates/ghul-console/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"ghul.compiler": {
"version": "0.5.2",
"version": "0.6.5",
"commands": [
"ghul-compiler"
]
Expand Down
2 changes: 1 addition & 1 deletion templates/ghul-console/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ghul.targets" Version="1.2.0" />
<PackageReference Include="ghul.targets" Version="1.2.1" />
<PackageReference Include="ghul.pipes" Version="1.0.0" />
<PackageReference Include="ghul.runtime" Version="1.0.0" />
</ItemGroup>
Expand Down
5 changes: 1 addition & 4 deletions templates/ghul-console/ghul-console.ghulproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>

<GhulCompiler>dotnet ghul-compiler</GhulCompiler>
</PropertyGroup>

<ItemGroup>
<GhulSources Include="src/**/*.ghul" />
<PackageReference Include="ghul.runtime" />
<PackageReference Include="ghul.pipes" />
<PackageReference Include="ghul.targets" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion tests/ghul-classlib/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"ghul.compiler": {
"version": "0.3.4",
"version": "0.6.5",
"commands": [
"ghul-compiler"
]
Expand Down
2 changes: 1 addition & 1 deletion tests/ghul-classlib/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<ItemGroup>
<PackageReference Include="ghul.targets" Version="1.2.0" />
<PackageReference Include="ghul.targets" Version="1.2.1" />
<PackageReference Include="ghul.pipes" Version="1.0.0" />
<PackageReference Include="ghul.runtime" Version="1.0.0" />
</ItemGroup>
Expand Down
6 changes: 1 addition & 5 deletions tests/ghul-classlib/tests.ghulproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Version>0.0.1-alpha.1</Version>

<GhulCompiler>dotnet ghul-compiler</GhulCompiler>
Expand All @@ -10,10 +10,6 @@
<ItemGroup>
<GhulSources Include="**/*.ghul" />

<PackageReference Include="ghul.runtime" />
<PackageReference Include="ghul.pipes" />
<PackageReference Include="ghul.targets" />

<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.8" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.8" />
Expand Down

0 comments on commit 2e93ca8

Please sign in to comment.