Skip to content

Commit 2b905da

Browse files
authored
Merge pull request #40 from shinji-san/release-v1.0.0
Release v1.0.0 Resolves: #40
2 parents f092b80 + 83a0f74 commit 2b905da

10 files changed

+166
-53
lines changed

.github/workflows/codeql-analysis.yml

+13-8
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,30 @@ jobs:
3939

4040
steps:
4141
- name: Checkout repository
42-
uses: actions/checkout@v2
42+
uses: actions/checkout@v4
4343

4444
- name: Setup .NET 6
45-
uses: actions/setup-dotnet@v1
45+
uses: actions/setup-dotnet@v4
4646
with:
47-
dotnet-version: 6.0.100
47+
dotnet-version: 6.0.416
4848

4949
- name: Setup .NET 7
50-
uses: actions/setup-dotnet@v1
50+
uses: actions/setup-dotnet@v4
5151
with:
52-
dotnet-version: 7.0.100
52+
dotnet-version: 7.0.403
53+
54+
- name: Setup .NET 8
55+
uses: actions/setup-dotnet@v4
56+
with:
57+
dotnet-version: 8.0.100
5358

5459
- name: .NET Core SxS
5560
run: |
56-
rsync -a ${DOTNET_ROOT/7.0.100/6.0.100}/* $DOTNET_ROOT/
61+
rsync -a ${DOTNET_ROOT/8.0.100/7.0.403/6.0.416}/* $DOTNET_ROOT/
5762
5863
# Initializes the CodeQL tools for scanning.
5964
- name: Initialize CodeQL
60-
uses: github/codeql-action/init@v1
65+
uses: github/codeql-action/init@v3
6166
with:
6267
languages: ${{ matrix.language }}
6368
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -88,4 +93,4 @@ jobs:
8893
# make release
8994

9095
- name: Perform CodeQL Analysis
91-
uses: github/codeql-action/analyze@v1
96+
uses: github/codeql-action/analyze@v3

.github/workflows/dotnetall.yml

+12-11
Original file line numberDiff line numberDiff line change
@@ -16,35 +16,36 @@ jobs:
1616
env:
1717
DOTNET_CLI_TELEMETRY_OPTOUT: true
1818
steps:
19-
- uses: actions/checkout@v1
19+
- uses: actions/checkout@v4
2020

2121
- name: Setup .NET 6
22-
uses: actions/setup-dotnet@v1
22+
uses: actions/setup-dotnet@v4
2323
with:
24-
dotnet-version: 6.0.100
24+
dotnet-version: 6.0.416
2525

2626
- name: Setup .NET 7
27-
uses: actions/setup-dotnet@v1
27+
uses: actions/setup-dotnet@v4
2828
with:
29-
dotnet-version: 7.0.100
29+
dotnet-version: 7.0.403
3030

31-
- name: .NET Core SxS
32-
run: |
33-
rsync -a ${DOTNET_ROOT/7.0.100/6.0.100}/* $DOTNET_ROOT/
31+
- name: Setup .NET 8
32+
uses: actions/setup-dotnet@v4
33+
with:
34+
dotnet-version: 8.0.100
3435

3536
- name: Restore
3637
run: dotnet restore LuhnDotNet.sln
3738

3839
- name: Build
39-
run: dotnet build --configuration Release LuhnDotNet.sln
40+
run: dotnet build --configuration Release --no-restore LuhnDotNet.sln
4041

4142
- name: Test
42-
run: dotnet test --configuration Release LuhnDotNet.sln
43+
run: dotnet test --no-restore --no-build --configuration Release LuhnDotNet.sln
4344

4445
- name: Prepare README.md for NuGet package
4546
run: |
4647
grep -n "## Install LuhnDotNet package" README.md | cut -d: -f 1| xargs -i tail -n +{} README.md > TMP.md && sed -i '1s/^/# Setup\r\n/' TMP.md && mv -f TMP.md README.md
4748
grep -n "# CLI building instructions" README.md | cut -d: -f 1| xargs -i head -n {} README.md | head -n -1 > TMP.md && mv -f TMP.md README.md
4849
4950
- name: Create Package
50-
run: dotnet pack --configuration Release LuhnDotNet.sln
51+
run: dotnet pack --no-restore --no-build --configuration Release LuhnDotNet.sln

.github/workflows/publishing.yml

+12-11
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,22 @@ jobs:
1414
env:
1515
DOTNET_CLI_TELEMETRY_OPTOUT: true
1616
steps:
17-
- uses: actions/checkout@v1
17+
- uses: actions/checkout@v4
1818

1919
- name: Setup .NET 6
20-
uses: actions/setup-dotnet@v1
20+
uses: actions/setup-dotnet@v4
2121
with:
22-
dotnet-version: 6.0.100
22+
dotnet-version: 6.0.416
2323

2424
- name: Setup .NET 7
25-
uses: actions/setup-dotnet@v1
25+
uses: actions/setup-dotnet@v4
2626
with:
27-
dotnet-version: 7.0.100
27+
dotnet-version: 7.0.403
2828

29-
- name: .NET Core SxS
30-
run: |
31-
rsync -a ${DOTNET_ROOT/7.0.100/6.0.100}/* $DOTNET_ROOT/
29+
- name: Setup .NET 8
30+
uses: actions/setup-dotnet@v4
31+
with:
32+
dotnet-version: 8.0.100
3233

3334
- name: Decrypt large secret
3435
run: ./.github/secrets/decrypt_publisher_snk.sh
@@ -40,10 +41,10 @@ jobs:
4041
run: dotnet restore LuhnDotNet.sln
4142

4243
- name: Build
43-
run: dotnet build --configuration Release LuhnDotNet.sln
44+
run: dotnet build --no-restore --configuration Release LuhnDotNet.sln
4445

4546
- name: Test
46-
run: dotnet test --configuration Release LuhnDotNet.sln
47+
run: dotnet test --no-restore --no-build --configuration Release LuhnDotNet.sln
4748

4849
- name: Remove obsolete NuGet packages
4950
run: rm -f src/bin/Release/LuhnDotNet*.nupk
@@ -54,7 +55,7 @@ jobs:
5455
grep -n "# CLI building instructions" README.md | cut -d: -f 1| xargs -i head -n {} README.md | head -n -1 > TMP.md && mv -f TMP.md README.md
5556
5657
- name: Create package
57-
run: dotnet pack --configuration Release LuhnDotNet.sln
58+
run: dotnet pack --no-restore --no-build --configuration Release LuhnDotNet.sln
5859

5960
- name: Publish package
6061
run: dotnet nuget push $(find src/bin/Release -type f -name 'LuhnDotNet*.nupkg' -print 2> /dev/null) -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate

CHANGELOG.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [1.0.0] - 2024-02-19
8+
### Added
9+
- Added .NET 8 support
10+
- Added support for SourceLink (GitHub)
11+
- Enable deterministic builds
12+
13+
### Changed
14+
- Changed parameter type of `Luhn.IsValid`, `Luhn.ComputeLuhnNumber` and `Luhn.ComputeCheckDigit` methods from `string` to `ReadOnlySpan<char>`.
15+
16+
### Deprecated
17+
- `Luhn.Compute()` method is EOL and will be deleted in the next version. Use `Luhn.ComputeCheckDigit()` or `Luhn.ComputeLuhanNumber()` instead.
18+
719
## [0.2.0] - 2022-12-18
820
### Added
921
- Added .NET 7 support
@@ -26,6 +38,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2638
### Added
2739
- Added initial version of LuhnDotNet
2840

29-
[Unreleased]: https://github.com/shinji-san/LuhnDotNet/compare/v0.1.0...HEAD
41+
[1.0.0]: https://github.com/shinji-san/LuhnDotNet/compare/v0.2.0...v1.0.0
3042
[0.2.0]: https://github.com/shinji-san/LuhnDotNet/compare/v0.1.0..v0.2.0
3143
[0.1.0]: https://github.com/shinji-san/LuhnDotNet/releases/tag/v0.1.0

README.md

+16-10
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ An C# implementation of the Luhn algorithm.
1313
</thead>
1414
<tbody>
1515
<tr>
16-
<td rowspan=9><a href ="https://github.com/shinji-san/LuhnDotNet/actions?query=workflow%3A%22LuhnDotNet+%28All+supported+TFM%29%22" target="_blank"><img src="https://github.com/shinji-san/LuhnDotNet/workflows/LuhnDotNet%20(All%20supported%20TFM)/badge.svg" alt="Build status"/></a></td>
17-
<td rowspan=9><code>LuhnDotNet.sln</code></td>
18-
<td rowspan=9>SDK</td>
16+
<td rowspan=10><a href ="https://github.com/shinji-san/LuhnDotNet/actions?query=workflow%3A%22LuhnDotNet+%28All+supported+TFM%29%22" target="_blank"><img src="https://github.com/shinji-san/LuhnDotNet/workflows/LuhnDotNet%20(All%20supported%20TFM)/badge.svg" alt="Build status"/></a></td>
17+
<td rowspan=10><code>LuhnDotNet.sln</code></td>
18+
<td rowspan=10>SDK</td>
1919
<td>Standard 2.0</td>
2020
</tr>
2121
<tr>
@@ -42,6 +42,9 @@ An C# implementation of the Luhn algorithm.
4242
<tr>
4343
<td>.NET 7</td>
4444
</tr>
45+
<tr>
46+
<td>.NET 8</td>
47+
</tr>
4548
</tbody>
4649
</table>
4750

@@ -58,14 +61,17 @@ An C# implementation of the Luhn algorithm.
5861
</thead>
5962
<tbody>
6063
<tr>
61-
<td rowspan=9><a href="https://github.com/shinji-san/LuhnDotNet/actions?query=workflow%3A%22LuhnDotNet+NuGet%22" target="_blank"><img src="https://github.com/shinji-san/LuhnDotNet/workflows/LuhnDotNet%20NuGet/badge.svg?branch=v0.2.0" alt="LuhnDotNet NuGet"/></a></td>
62-
<td rowspan=9><a href="https://badge.fury.io/nu/LuhnDotNet" target="_blank"><img src="https://badge.fury.io/nu/LuhnDotNet.svg" alt="NuGet Version 0.2.0"/></a></td>
63-
<td rowspan=9><a href="https://github.com/shinji-san/LuhnDotNet/tree/v0.2.0" target="_blank"><img src="https://img.shields.io/badge/LuhnDotNet-0.2.0-green.svg?logo=github&logoColor=959da5&color=2ebb4e&labelColor=2b3137" alt="Tag"/></a></td>
64+
<td rowspan=10><a href="https://github.com/shinji-san/LuhnDotNet/actions?query=workflow%3A%22LuhnDotNet+NuGet%22" target="_blank"><img src="https://github.com/shinji-san/LuhnDotNet/workflows/LuhnDotNet%20NuGet/badge.svg?branch=v1.0.0" alt="LuhnDotNet NuGet"/></a></td>
65+
<td rowspan=10><a href="https://badge.fury.io/nu/LuhnDotNet" target="_blank"><img src="https://badge.fury.io/nu/LuhnDotNet.svg" alt="NuGet Version 1.0.0"/></a></td>
66+
<td rowspan=10><a href="https://github.com/shinji-san/LuhnDotNet/tree/v1.0.0" target="_blank"><img src="https://img.shields.io/badge/LuhnDotNet-1.0.0-green.svg?logo=github&logoColor=959da5&color=2ebb4e&labelColor=2b3137" alt="Tag"/></a></td>
6467
<td>.NET 6</td>
6568
</tr>
6669
<tr>
6770
<td>.NET 7</td>
6871
</tr>
72+
<tr>
73+
<td>.NET 8</td>
74+
</tr>
6975
<tr>
7076
<td>Standard 2.0</td>
7177
</tr>
@@ -94,10 +100,10 @@ An C# implementation of the Luhn algorithm.
94100

95101
1. Open a console and switch to the directory, containing your project file.
96102

97-
2. Use the following command to install version 0.2.0 of the LuhnDotNet package:
103+
2. Use the following command to install version 1.0.0 of the LuhnDotNet package:
98104

99105
```dotnetcli
100-
dotnet add package LuhnDotNet -v 0.2.0 -f <FRAMEWORK>
106+
dotnet add package LuhnDotNet -v 1.0.0 -f <FRAMEWORK>
101107
```
102108
103109
3. After the completition of the command, look at the project file to make sure that the package is successfuly installed.
@@ -106,7 +112,7 @@ An C# implementation of the Luhn algorithm.
106112
107113
```xml
108114
<ItemGroup>
109-
<PackageReference Include="LuhnDotNet" Version="0.2.0" />
115+
<PackageReference Include="LuhnDotNet" Version="1.0.0" />
110116
</ItemGroup>
111117
```
112118
## Remove LuhnDotNet package
@@ -206,7 +212,7 @@ namespace Example4
206212

207213
# CLI building instructions
208214
For the following instructions, please make sure that you are connected to the internet. If necessary, NuGet will try to restore the [xUnit](https://xunit.net/) packages.
209-
## Using dotnet to build for .NET 6, .NET 7 and .NET FX 4.x
215+
## Using dotnet to build for .NET 6, .NET 7, .NET 8 and .NET FX 4.x
210216
Use one of the following solutions with `dotnet` to build [LuhnDotNet](#luhndotnet):
211217
* `LuhnDotNet.sln` (all, [see table](#build--test-status-of-default-branch))
212218

0 commit comments

Comments
 (0)