Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"isRoot": true,
"tools": {
"nbgv": {
"version": "3.7.115",
"version": "3.9.50",
"commands": [
"nbgv"
],
"rollForward": false
},
"csharpier": {
"version": "1.1.2",
"version": "1.2.1",
"commands": [
"csharpier"
],
Expand Down
18 changes: 7 additions & 11 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,18 @@
{
"name": "C# (.NET)",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/debian:bullseye",
"customizations": {
"vscode": {
"extensions": [
"ms-dotnettools.csdevkit",
"ms-dotnettools.csharp",
"csharpier.csharpier-vscode"
]
}
},
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
// https://github.com/devcontainers/features/tree/main/src/dotnet
"ghcr.io/devcontainers/features/dotnet:2": {
"version": "lts",
"additionalDotnetVersions": "8.0, 7.0, 6.0"
"additionalVersions": "10.0, 9.0, 8.0"
}
},
"containerEnv": {
// disable Git Versioning in the container
"NBGV_GitEngine": "Disabled"
}
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [5000, 5001],
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
60 changes: 0 additions & 60 deletions .github/workflows/release-github.yaml

This file was deleted.

74 changes: 65 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,42 @@
name: Release Package to NuGet
name: Package Release to GitHub and Nuget

on:
workflow_dispatch:
push:
branches:
- release/*

permissions:
contents: write

env:
DOTNET_VERSION: '10.0.x'

jobs:
release-nuget:
package-build:
runs-on: ubuntu-latest
outputs:
VERSION: ${{ steps.version.outputs.VERSION }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
10.x
9.x
8.x
dotnet-version: ${{ env.DOTNET_VERSION }}
cache: true
cache-dependency-path: '**/packages.lock.json'


- uses: dotnet/nbgv@master
id: nbgv

- name: export version to env
id: version
run: echo "VERSION=${{ steps.nbgv.outputs.SemVer2 }}" >> $GITHUB_ENV

- name: Restore dependencies
run: dotnet restore --locked-mode

Expand All @@ -30,6 +45,47 @@ jobs:

- name: Generate Nuget Package
run: dotnet pack --no-build -c Release --output ./artifacts

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: nuget-packages
path: ./artifacts/*.nupkg
retention-days: 1

release-github:
runs-on: ubuntu-latest
needs: package-build
steps:
- name: Download Artifacts
uses: actions/download-artifact@v5
with:
name: nuget-packages
path: ./artifacts

- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
name: ${{ needs.package-build.outputs.VERSION }}
tag_name: ${{ needs.package-build.outputs.VERSION }}
target_commitish: ${{ github.ref }}
generate_release_notes: true
files: ./artifacts/*.nupkg
# if hyphen contains in the tag name, it will be prerelease
prerelease: ${{ contains(needs.package-build.outputs.VERSION, '-') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release-nuget:
runs-on: ubuntu-latest
needs: package-build
steps:
- name: Download Artifacts
uses: actions/download-artifact@v5
with:
name: nuget-packages
path: ./artifacts

- name: Publish Nuget Package
run: dotnet nuget push ./artifacts/*.nupkg --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
- '**.cs'
- '**.razor'
- '**.yaml'
# for auto mergie
- '**/package*.json'
- '**/dotnet-tools.json'

jobs:
test:
Expand Down Expand Up @@ -38,4 +41,4 @@ jobs:
run: dotnet build --no-restore

- name: Run tests
run: dotnet test --no-build --verbosity normal
run: dotnet test --no-build --verbosity normal
2 changes: 2 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"recommendations": [
"ms-dotnettools.csdevkit",
"ms-dotnettools.csharp",
"csharpier.csharpier-vscode"
]
}
Binary file added assets/blazorlocaltime.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/blazorlocaltime_512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions example/BlazorLocalTimeSample/BlazorLocalTimeSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AntDesign" Version="1.4.3" />
<PackageReference Include="AntDesign" Version="1.5.0" />
<PackageReference
Include="Microsoft.AspNetCore.Components.WebAssembly"
Version="10.0.0-rc.1.25451.107"
/>
<PackageReference
Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer"
Version="10.0.0-rc.1.25451.107"
Version="10.0.0"
PrivateAssets="all"
/>
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.12.1" />
<PackageReference Include="MudBlazor" Version="8.10.0" />
<PackageReference Include="PublishSPAforGitHubPages.Build" Version="3.0.1" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.13.1" />
<PackageReference Include="MudBlazor" Version="8.14.0" />
<PackageReference Include="PublishSPAforGitHubPages.Build" Version="3.0.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\BlazorLocalTime\BlazorLocalTime.csproj" />
Expand Down
4 changes: 2 additions & 2 deletions src/BlazorLocalTime/BlazorLocalTime.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
/>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="10.0.0-rc.1.25451.107" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="10.*" />
<PackageReference
Include="Microsoft.Extensions.DependencyInjection.Abstractions"
Version="10.0.0-rc.1.25451.107"
Version="10.*"
/>
</ItemGroup>
</Project>
Loading