Skip to content

Commit 5b05186

Browse files
authored
Merge pull request #1 from lantean-code/release/1.0.0
Release/1.0.0
2 parents cc63cd9 + 9404cc6 commit 5b05186

8 files changed

Lines changed: 187 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
uses: actions/checkout@v4
2020
with:
2121
fetch-depth: 0
22+
fetch-tags: true
2223

2324
- name: Setup .NET
2425
uses: actions/setup-dotnet@v4

.github/workflows/release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
uses: actions/checkout@v4
1818
with:
1919
fetch-depth: 0
20+
fetch-tags: true
2021

2122
- name: Setup .NET
2223
uses: actions/setup-dotnet@v4
@@ -32,8 +33,12 @@ jobs:
3233
id: gitversion
3334
shell: bash
3435
run: |
36+
MAJOR_MINOR_PATCH=$(dotnet gitversion /output json /showvariable MajorMinorPatch)
37+
PRE_RELEASE_LABEL=$(dotnet gitversion /output json /showvariable PreReleaseLabel)
3538
VERSION=$(dotnet gitversion /output json /showvariable SemVer)
3639
SAFE_VERSION=$(echo "$VERSION" | sed -E 's/[^A-Za-z0-9._+-]+/-/g')
40+
echo "MAJOR_MINOR_PATCH=$MAJOR_MINOR_PATCH" >> $GITHUB_ENV
41+
echo "PRE_RELEASE_LABEL=$PRE_RELEASE_LABEL" >> $GITHUB_ENV
3742
echo "VERSION=$VERSION" >> $GITHUB_ENV
3843
echo "VERSION_SAFE=$SAFE_VERSION" >> $GITHUB_ENV
3944
@@ -113,6 +118,45 @@ jobs:
113118
echo "::error::Expected an existing git tag '${VERSION}' (or 'v${VERSION}') before creating a stable release."
114119
exit 1
115120
121+
- name: Resolve Release Notes File
122+
if: steps.release_channel.outputs.channel != 'none'
123+
id: release_notes
124+
shell: bash
125+
run: |
126+
if [ "${{ steps.release_channel.outputs.channel }}" = "stable" ]; then
127+
notes_file="release-notes/${MAJOR_MINOR_PATCH}.md"
128+
else
129+
notes_file="release-notes/${MAJOR_MINOR_PATCH}-${{ steps.release_channel.outputs.channel }}.md"
130+
fi
131+
132+
if [ ! -f "${notes_file}" ]; then
133+
fallback_notes_file="release-notes/${{ steps.release_channel.outputs.channel }}.md"
134+
135+
if [ -f "${fallback_notes_file}" ]; then
136+
notes_file="${fallback_notes_file}"
137+
else
138+
echo "::error::Expected release notes file '${notes_file}' was not found and fallback '${fallback_notes_file}' was not available."
139+
exit 1
140+
fi
141+
fi
142+
143+
echo "file=${notes_file}" >> $GITHUB_OUTPUT
144+
145+
- name: Render Release Notes
146+
if: steps.release_channel.outputs.channel != 'none'
147+
id: render_release_notes
148+
shell: bash
149+
run: |
150+
rendered_notes_file="$(mktemp)"
151+
152+
sed \
153+
-e "s/{{VERSION}}/${VERSION}/g" \
154+
-e "s/{{NUGET_VERSION}}/${VERSION}/g" \
155+
-e "s/{{MAJOR_MINOR_PATCH}}/${MAJOR_MINOR_PATCH}/g" \
156+
"${{ steps.release_notes.outputs.file }}" > "${rendered_notes_file}"
157+
158+
echo "file=${rendered_notes_file}" >> $GITHUB_OUTPUT
159+
116160
- name: Create GitHub release
117161
if: steps.release_channel.outputs.channel != 'none'
118162
env:
@@ -130,6 +174,9 @@ jobs:
130174
fi
131175
132176
if gh release view "${{ steps.resolve_tag.outputs.tag }}" >/dev/null 2>&1; then
177+
gh release edit "${{ steps.resolve_tag.outputs.tag }}" \
178+
--notes-file "${{ steps.render_release_notes.outputs.file }}"
179+
133180
gh release upload "${{ steps.resolve_tag.outputs.tag }}" \
134181
/tmp/artifacts/blazor-hashrouting/package/release/Blazor.HashRouting.${VERSION}.nupkg \
135182
/tmp/artifacts/blazor-hashrouting/package/release/Blazor.HashRouting.${VERSION}.snupkg \
@@ -140,6 +187,7 @@ jobs:
140187
/tmp/artifacts/blazor-hashrouting/package/release/Blazor.HashRouting.${VERSION}.snupkg \
141188
--title "${{ steps.release_channel.outputs.label }} ${{ steps.resolve_tag.outputs.tag }}" \
142189
--target "${GITHUB_SHA}" \
190+
--notes-file "${{ steps.render_release_notes.outputs.file }}" \
143191
"${release_args[@]}"
144192
fi
145193

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,11 @@
44

55
- Initial standalone release preparation.
66
- Prepared the package for independent build, test, and NuGet packaging.
7+
8+
## 1.0.0-rc.1
9+
10+
- First release candidate of `Blazor.HashRouting`.
11+
- Added reusable hash-fragment routing for browser-hosted Blazor WebAssembly applications.
12+
- Added canonical `/#/...` routing, internal link interception, back/forward handling, and navigation lock integration.
13+
- Added standalone NuGet packaging, static web assets, and independent CI/release automation.
14+
- Multi-targeted the package for `net9.0` and `net10.0`.

release-notes/1.0.0-rc.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Blazor.HashRouting {{VERSION}}
2+
3+
## Summary
4+
5+
Release candidate build for the `{{MAJOR_MINOR_PATCH}}` line of `Blazor.HashRouting`, a reusable hash-fragment routing engine for browser-hosted Blazor WebAssembly applications.
6+
7+
This package is intended for environments where the host can serve the application root document and static assets, but cannot reliably serve deep-linked route paths on refresh.
8+
9+
## Highlights
10+
11+
- Hash-fragment routing built on top of Blazor's navigation model
12+
- Canonical `/#/...` URL handling
13+
- Internal link interception for same-origin navigation
14+
- Browser back/forward and hash change support
15+
- Navigation lock integration
16+
- Standalone NuGet-ready packaging with static web assets
17+
- Multi-targeted for `net9.0` and `net10.0`
18+
19+
## Installation
20+
21+
```bash
22+
dotnet add package Blazor.HashRouting --version {{NUGET_VERSION}}
23+
```
24+
25+
## Basic usage
26+
27+
```csharp
28+
using Blazor.HashRouting;
29+
30+
var builder = WebAssemblyHostBuilder.CreateDefault(args);
31+
32+
builder.Services.AddHashRouting();
33+
34+
await builder.Build().RunAsync();
35+
```
36+
37+
## URL examples
38+
39+
- Root route: `/#/`
40+
- Nested route: `/#/settings`
41+
- Base-path route: `/proxy/app/#/settings`
42+
43+
## Supported environments
44+
45+
- Blazor WebAssembly running in a browser
46+
47+
## Not supported
48+
49+
- Blazor Server
50+
- Blazor Hybrid

release-notes/1.0.0.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Blazor.HashRouting {{VERSION}}
2+
3+
## Summary
4+
5+
Stable release for the `{{MAJOR_MINOR_PATCH}}` line of `Blazor.HashRouting`, a reusable hash-fragment routing engine for browser-hosted Blazor WebAssembly applications.
6+
7+
This package is intended for environments where the host can serve the application root document and static assets, but cannot reliably serve deep-linked route paths on refresh.
8+
9+
## Highlights
10+
11+
- Hash-fragment routing built on top of Blazor's navigation model
12+
- Canonical `/#/...` URL handling
13+
- Internal link interception for same-origin navigation
14+
- Browser back/forward and hash change support
15+
- Navigation lock integration
16+
- Standalone NuGet-ready packaging with static web assets
17+
- Multi-targeted for `net9.0` and `net10.0`
18+
19+
## Installation
20+
21+
```bash
22+
dotnet add package Blazor.HashRouting --version {{NUGET_VERSION}}
23+
```
24+
25+
## Basic usage
26+
27+
```csharp
28+
using Blazor.HashRouting;
29+
30+
var builder = WebAssemblyHostBuilder.CreateDefault(args);
31+
32+
builder.Services.AddHashRouting();
33+
34+
await builder.Build().RunAsync();
35+
```
36+
37+
## URL examples
38+
39+
- Root route: `/#/`
40+
- Nested route: `/#/settings`
41+
- Base-path route: `/proxy/app/#/settings`
42+
43+
## Supported environments
44+
45+
- Blazor WebAssembly running in a browser
46+
47+
## Not supported
48+
49+
- Blazor Server
50+
- Blazor Hybrid

release-notes/alpha.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Blazor.HashRouting {{VERSION}}
2+
3+
## Summary
4+
5+
Alpha build of `Blazor.HashRouting`.
6+
7+
This prerelease is intended for early validation of hash-fragment routing in browser-hosted Blazor WebAssembly applications.
8+
9+
## Installation
10+
11+
```bash
12+
dotnet add package Blazor.HashRouting --version {{NUGET_VERSION}}
13+
```

release-notes/beta.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Blazor.HashRouting {{VERSION}}
2+
3+
## Summary
4+
5+
Beta build of `Blazor.HashRouting`.
6+
7+
This prerelease is intended for broader validation of hash-fragment routing in browser-hosted Blazor WebAssembly applications.
8+
9+
## Installation
10+
11+
```bash
12+
dotnet add package Blazor.HashRouting --version {{NUGET_VERSION}}
13+
```

src/Blazor.HashRouting/Blazor.HashRouting.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
</PropertyGroup>
2626

2727
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
28-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.13" />
29-
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.13" />
28+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.0" />
29+
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.0" />
3030
</ItemGroup>
3131

3232
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
33-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.4" />
34-
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="10.0.4" />
33+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.0" />
34+
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="10.0.0" />
3535
</ItemGroup>
3636

3737
<ItemGroup>

0 commit comments

Comments
 (0)