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
22 changes: 10 additions & 12 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
permissions:
id-token: write
contents: write
packages: write
actions: read

env:
Expand Down Expand Up @@ -51,17 +52,6 @@ jobs:
echo "CURRENT_VERSION=$VERSION" >> $GITHUB_ENV
shell: bash

- name: Check if package (${{ env.PACKAGE_CURRENCIES_ID }}) version already exists on NuGet.org
id: check_nuget
run: |
PACKAGE_CURRENCIES_ID_LOWER=$(echo "${{ env.PACKAGE_CURRENCIES_ID }}" | tr '[:upper:]' '[:lower:]')
STATUS_CODE=$(curl -s -o /dev/null -I -w "%{http_code}" "https://api.nuget.org/v3-flatcontainer/${PACKAGE_CURRENCIES_ID_LOWER}/${{ env.CURRENT_VERSION }}/index.json")
if [ "$STATUS_CODE" -eq 200 ]; then
echo "Error: Version ${{ env.CURRENT_VERSION }} already exists on NuGet.org!"
exit 1
fi
shell: bash

- name: Restore dependencies
run: dotnet restore ${{ env.SOLUTION_NAME }}

Expand Down Expand Up @@ -128,4 +118,12 @@ jobs:
dotnet nuget push "${{ env.OUTPUT_NUGET_DIR }}/${{ env.PACKAGE_CURRENCIES_ID }}.${{ env.CURRENT_VERSION }}.nupkg" \
--api-key ${{steps.login.outputs.NUGET_API_KEY}} \
--source ${{ env.NUGET_SOURCE_URL }}
shell: bash
--skip-duplicate
shell: bash

- name: Publish package (HawkN.Iso.Currencies) to GitHub packages
run: |
dotnet nuget push "${{ env.OUTPUT_NUGET_DIR }}/${{ env.PACKAGE_CURRENCIES_ID }}.${{ env.CURRENT_VERSION }}.nupkg" \
--source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
--api-key ${{ secrets.GITHUB_TOKEN }} \
--skip-duplicate
2 changes: 1 addition & 1 deletion src/packages/HawkN.Iso.Currencies.Generators/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ internal static class Constants
public const string ErrorPrefixName = "CURRENCY_";
public static readonly string[] ExtendedSourceData =
[
"Release: release-48",
"Release: release-48.1.0",
"CLDR URL: https://github.com/unicode-org/cldr",
"Currency codes URL: https://raw.githubusercontent.com/datasets/currency-codes/main/data/codes-all.csv"
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ For terms of use, see https://www.unicode.org/copyright.html
<info iso4217="OMR" digits="3" rounding="0"/>
<info iso4217="PKR" digits="0" rounding="0"/>
<info iso4217="PYG" digits="0" rounding="0"/>
<info iso4217="RSD" digits="0" rounding="0"/>
<info iso4217="RSD" digits="2" rounding="0" cashDigits="0" cashRounding="0"/>
<info iso4217="RWF" digits="0" rounding="0"/>
<info iso4217="SEK" digits="2" rounding="0" cashDigits="0" cashRounding="0"/>
<info iso4217="SLE" digits="2" rounding="0"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<IsPackable>false</IsPackable>
<DownloadCldrFiles>false</DownloadCldrFiles>
<DownloadCodesFiles>false</DownloadCodesFiles>
<CldrVersion>release-48</CldrVersion>
<CldrVersion>release-48-1</CldrVersion>
<IsoCurrenciesEnTranslationsUrl>https://raw.githubusercontent.com/unicode-org/cldr/$(CldrVersion)/common/main/en.xml</IsoCurrenciesEnTranslationsUrl>
<IsoCurrenciesUrl>https://raw.githubusercontent.com/unicode-org/cldr/$(CldrVersion)/common/supplemental/supplementalData.xml</IsoCurrenciesUrl>
<IsoCurrenciesCodesUrl>https://raw.githubusercontent.com/datasets/currency-codes/main/data/codes-all.csv</IsoCurrenciesCodesUrl>
Expand Down
4 changes: 2 additions & 2 deletions src/packages/HawkN.Iso.Currencies.Generators/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The **HawkN.Iso.Currencies** project uses a Source Generator to generate currenc
4. Rebuild the solution.
5. Review the generated files:
- `CurrencyCode.cs`
- `LocalDatabase.cs`
- `LocalCurrencyDatabase.cs`
6. After verification, disable generation:
```json lines
<GenerateCurrencyFiles>false</GenerateCurrencyFiles>
Expand Down Expand Up @@ -55,7 +55,7 @@ Replace `<release>` with the desired CLDR release version (for example: `release
3. Rebuild the project.
4. Verify that:
- CLDR XML files were downloaded
- `CurrencyCode.cs` and `LocalCurrecnyDatabase.cs` were regenerated
- `CurrencyCode.cs` and `LocalCurrencyDatabase.cs` were regenerated
5. Commit the generated changes to the repository.
6. Disable the flags again:
```json lines
Expand Down
4 changes: 2 additions & 2 deletions src/packages/HawkN.Iso.Currencies/CurrencyCode.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// <auto-generated>
// This file was generated by HawkN.Iso.Currencies.Generators source generator
// Release: release-48
// Release: release-48.1.0
// CLDR URL: https://github.com/unicode-org/cldr
// Currency codes URL: https://raw.githubusercontent.com/datasets/currency-codes/main/data/codes-all.csv
// Do not modify this file manually.
Expand All @@ -10,7 +10,7 @@ namespace HawkN.Iso.Currencies
{
/// <summary>
/// Currency codes ISO4217
/// Last published at 2026-01-04.
/// Last published at 2026-01-16.
/// </summary>
public enum CurrencyCode
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<IncludeBuildOutput>false</IncludeBuildOutput>
<IncludeSymbols>false</IncludeSymbols>
<IsPackable>true</IsPackable>
<VersionPrefix>8.0.0</VersionPrefix>
<VersionPrefix>8.0.1</VersionPrefix>
<!-- Use when need to update 'CurrencyCode' and 'LocalCurrencyDatabase' -->
<GenerateCurrencyFiles Condition="'$(GenerateCurrencyFiles)' == ''">false</GenerateCurrencyFiles>
<EmitCompilerGeneratedFiles>$(GenerateCurrencyFiles)</EmitCompilerGeneratedFiles>
Expand Down
4 changes: 2 additions & 2 deletions src/packages/HawkN.Iso.Currencies/LocalCurrencyDatabase.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// <auto-generated>
// This file was generated by HawkN.Iso.Currencies.Generators source generator
// Release: release-48
// Release: release-48.1.0
// CLDR URL: https://github.com/unicode-org/cldr
// Currency codes URL: https://raw.githubusercontent.com/datasets/currency-codes/main/data/codes-all.csv
// Do not modify this file manually.
Expand All @@ -16,7 +16,7 @@ internal static class LocalCurrencyDatabase
{
/// <summary>
/// Actual currency information for codes ISO4217
/// Last published at 2026-01-04.
/// Last published at 2026-01-16.
/// </summary>
public static readonly ImmutableArray<Models.Currency> ActualCurrencies = ImmutableArray.Create(new Models.Currency[]
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ var validResult = currencyService.TryValidate(CurrencyCode.AFN, out var validate

## Supported currencies
See the currency list with the [link](https://github.com/HawkN113/HawkN.Iso.Currencies?tab=readme-ov-file#supported-currencies)
Last updated at `01.01.2026`
Last updated at `16.01.2026`

---

Expand Down