Skip to content

Commit

Permalink
update to .net 8
Browse files Browse the repository at this point in the history
  • Loading branch information
pwelter34 committed Dec 4, 2023
1 parent e3fbb0b commit 6bb6680
Show file tree
Hide file tree
Showing 77 changed files with 285 additions and 1,753 deletions.
22 changes: 8 additions & 14 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
time: "01:00"
open-pull-requests-limit: 10

- package-ecosystem: nuget
directory: "/"
schedule:
interval: daily
time: "11:00"
time: "02:00"
open-pull-requests-limit: 10
ignore:
- dependency-name: Microsoft.NET.Test.Sdk
versions:
- 16.9.4
- dependency-name: DataGenerator
versions:
- 5.0.0.178
- dependency-name: Npgsql
versions:
- 5.0.3
- dependency-name: coverlet.msbuild
versions:
- 3.0.2
174 changes: 107 additions & 67 deletions .github/workflows/dotnetcore.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,115 @@
name: .NET Core
name: Build

on: [push, pull_request]
env:
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_ENVIRONMENT: github
ASPNETCORE_ENVIRONMENT: github
BUILD_PATH: "${{github.workspace}}/artifacts"

on:
push:
branches:
- master
- develop
tags:
- "v*"
pull_request:
branches:
- master
- develop

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup .NET 6.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x

- name: Install GitVersion
run: dotnet tool install --global GitVersion.Tool

- name: Determine Version
run: dotnet gitversion /output buildserver /updateprojectfiles

- name: Build Reason
run: "echo ref: ${{github.ref}} event: ${{github.event_name}}"

- name: Build Solution
run: dotnet build --configuration Release

- name: Package Nuget
if: success() && github.event_name != 'pull_request'
run: dotnet pack --configuration Release --include-symbols --include-source --no-restore

- name: Publish Samples
if: success() && github.event_name != 'pull_request'
run: dotnet publish --configuration Release --output publish

- name: Upload Artifacts
if: success() && github.event_name != 'pull_request'
uses: actions/upload-artifact@v1.0.0
with:
name: artifacts
path: artifacts

- name: Publish CI Packages
if: success() && github.event_name != 'pull_request'
run: |
dotnet nuget add source --username pwelter34 --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/loresoft/index.json"
for package in $(find -name "*.nupkg"); do
echo "${0##*/}": Pushing $package...
dotnet nuget push $package --source https://www.myget.org/F/loresoft/api/v3/index.json --api-key ${{ secrets.MYGET_KEY }} --skip-duplicate
dotnet nuget push $package --source "github" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
done
- name: Publish Release Packages
if: success() && startsWith(github.ref, 'refs/tags/v')
run: |
for package in $(find -name "*.nupkg"); do
echo "${0##*/}": Pushing $package...
dotnet nuget push $package --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_KEY }} --skip-duplicate
done
- name: Deploy Sample Website
if: success() && github.ref == 'refs/heads/master'
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: publish/wwwroot
fqdn: blazor.loresoft.com
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PAT: ${{ secrets.COMMITTOKEN }}
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x

- name: Restore Dependencies
run: dotnet restore

- name: Build Solution
run: dotnet build --no-restore --configuration Release

- name: Create Packages
if: success() && github.event_name != 'pull_request'
run: dotnet pack --configuration Release --include-symbols --include-source --no-build --output "${{env.BUILD_PATH}}/packages"

- name: Publish Samples
if: success() && github.event_name != 'pull_request'
run: dotnet publish --configuration Release --output "${{env.BUILD_PATH}}/sample"

- name: Upload Packages
if: success() && github.event_name != 'pull_request'
uses: actions/upload-artifact@v3
with:
name: packages
path: "${{env.BUILD_PATH}}/packages"

- name: Upload Sample Web Site
if: success() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v'))
uses: actions/upload-pages-artifact@v2
with:
name: github-pages
path: "${{env.BUILD_PATH}}/sample"

deploy:
runs-on: ubuntu-latest
needs: build
if: success() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v'))

steps:
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: packages

- name: Publish Packages GitHub
run: |
for package in $(find -name "*.nupkg"); do
echo "${0##*/}": Pushing $package...
dotnet nuget push $package --source https://nuget.pkg.github.com/loresoft/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
done
- name: Publish Packages feedz
run: |
for package in $(find -name "*.nupkg"); do
echo "${0##*/}": Pushing $package...
dotnet nuget push $package --source https://f.feedz.io/loresoft/open/nuget/index.json --api-key ${{ secrets.FEEDDZ_KEY }} --skip-duplicate
done
- name: Publish Packages Nuget
if: startsWith(github.ref, 'refs/tags/v')
run: |
for package in $(find -name "*.nupkg"); do
echo "${0##*/}": Pushing $package...
dotnet nuget push $package --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_KEY }} --skip-duplicate
done
pages:
runs-on: ubuntu-latest
needs: build
if: success() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v'))

permissions:
pages: write
id-token: write

steps:
- name: Deploy Sample
id: deployment
uses: actions/deploy-pages@v2

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
55 changes: 55 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<Project>

<PropertyGroup Label="Package">
<Description>Blazor Controls Library</Description>
<Copyright>Copyright © $([System.DateTime]::Now.ToString(yyyy)) LoreSoft</Copyright>
<Authors>LoreSoft</Authors>
<NeutralLanguage>en-US</NeutralLanguage>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>Blazor;Typeahead;AutoComplete;Razor Components;Controls;Multiselect;DatePicker</PackageTags>
<PackageProjectUrl>https://github.com/loresoft/LoreSoft.Blazor.Controls</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>logo.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/loresoft/LoreSoft.Blazor.Controls</RepositoryUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
</PropertyGroup>

<PropertyGroup>
<DebugType>portable</DebugType>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<PropertyGroup>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>1591</NoWarn>
</PropertyGroup>

<PropertyGroup>
<MinVerTagPrefix>v</MinVerTagPrefix>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AssemblyMetadata.Generators" Version="1.1.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="MinVer" Version="4.3.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<None Include=".\..\..\logo.png">
<Pack>true</Pack>
<PackagePath>\</PackagePath>
<Visible>false</Visible>
</None>
<None Include=".\..\..\README.md">
<Pack>true</Pack>
<PackagePath>\</PackagePath>
<Visible>false</Visible>
</None>
</ItemGroup>

</Project>
2 changes: 0 additions & 2 deletions GitVersion.yml

This file was deleted.

8 changes: 3 additions & 5 deletions LoreSoft.Blazor.Controls.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29123.89
# Visual Studio Version 17
VisualStudioVersion = 17.8.34309.116
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LoreSoft.Blazor.Controls", "src\LoreSoft.Blazor.Controls\LoreSoft.Blazor.Controls.csproj", "{F9459EF7-3E4F-4C94-B2A0-680D8C437FB4}"
EndProject
Expand All @@ -13,10 +13,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.ServerSide", "sample
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{3E5818B3-6609-4EC5-AFA1-849C4E5080D1}"
ProjectSection(SolutionItems) = preProject
build\common.props = build\common.props
Directory.Build.props = Directory.Build.props
.github\workflows\dotnetcore.yml = .github\workflows\dotnetcore.yml
GitVersion.yml = GitVersion.yml
build\sourcelink.props = build\sourcelink.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.ClientSide", "samples\Sample.ClientSide\Sample.ClientSide.csproj", "{0015C9C3-114B-4C3B-AF31-08D0143714F3}"
Expand Down
38 changes: 0 additions & 38 deletions appveyor.yml

This file was deleted.

41 changes: 0 additions & 41 deletions build/common.props

This file was deleted.

12 changes: 0 additions & 12 deletions build/sourcelink.props

This file was deleted.

Loading

0 comments on commit 6bb6680

Please sign in to comment.