Skip to content
Open
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
43 changes: 32 additions & 11 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,52 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: Build and test
name: .NET

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
inputs:
has_tags:
description: 'True to print to STDOUT'
required: true
type: boolean
tags:
description: 'Test scenario tags'
required: true
type: string

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: New tool-manifest
run: dotnet new tool-manifest
- name: Tool install
run: dotnet tool install dotnetCampus.TagToVersion
- name: TagToVersion
if: ${{ inputs.has_tags }}
run: dotnet TagToVersion -t $TAGS -f Version.props
env:
TAGS: ${{ inputs.tags }}
- name: Restore dependencies
working-directory: src
run: dotnet restore Nominatim.API.sln
run: dotnet restore
- name: Build
working-directory: src
run: dotnet build Nominatim.API.sln --no-restore
- name: Test
run: dotnet build --no-restore -c release
- name: Package
working-directory: src
run: dotnet test Nominatim.API.sln --no-build --verbosity normal
run: dotnet pack --no-restore -c release -o ${{env.DOTNET_ROOT}}/app
# - name: Test
# working-directory: src
# run: dotnet test --no-build --verbosity normal
- name: Push
if: ${{ inputs.has_tags }}
run: dotnet nuget push ${{env.DOTNET_ROOT}}/app/*.nupkg -k ${{ vars.MYGET_API_KEY }} -s ${{ vars.MYGET_URL }}

5 changes: 5 additions & 0 deletions Version.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<Version>2.0.0</Version>
</PropertyGroup>
</Project>
49 changes: 38 additions & 11 deletions src/Nominatim.API/Models/AddressResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ public class AddressResult {
public string Country { get; set; }

/// <summary>
/// Country code
/// Country code
/// </summary>
[JsonProperty("country_code")]
public string CountryCode { get; set; }

/// <summary>
/// County name
/// County name
/// </summary>
[JsonProperty("county")]
public string County { get; set; }
Expand Down Expand Up @@ -45,22 +45,25 @@ public class AddressResult {
public string State { get; set; }

/// <summary>
/// Town Name
/// Town Name 城镇
/// </summary>
[JsonProperty("town")]
public string Town { get; set; }

/// <summary>
/// Pedestrian 步行
/// </summary>
[JsonProperty("pedestrian")]
public string Pedestrian { get; set; }

/// <summary>
/// Neighbourhood
/// Neighbourhood 街区
/// </summary>
[JsonProperty("neighbourhood")]
public string Neighborhood { get; set; }

/// <summary>
/// Hamlet
/// Hamlet 村庄
/// </summary>
[JsonProperty("hamlet")]
public string Hamlet { get; set; }
Expand All @@ -72,7 +75,7 @@ public class AddressResult {
public string Suburb { get; set; }

/// <summary>
/// Village Name
/// Village Name 村庄
/// </summary>
[JsonProperty("village")]
public string Village { get; set; }
Expand All @@ -90,9 +93,9 @@ public class AddressResult {
public string Region { get; set; }

/// <summary>
/// District Name
/// District Name
/// </summary>
[JsonProperty("state_district")]
[JsonProperty("district")]
public string District { get; set; }

/// <summary>
Expand All @@ -102,21 +105,45 @@ public class AddressResult {
public string Name { get; set; }

/// <summary>
/// Tourism
/// Tourism 旅游区
/// </summary>
[JsonProperty("tourism")]
public string Tourism { get; set; }

/// <summary>
/// Municipality
/// Municipality
/// </summary>
[JsonProperty("municipality")]
public string Municipality { get; set; }

/// <summary>
/// Quarter
/// Quarter 街区
/// </summary>
[JsonProperty("quarter")]
public string Quarter { get; set; }

/// <summary>
/// Residential 住宅区
/// </summary>
[JsonProperty("residential")]
public string Residential { get; set; }

/// <summary>
/// Amenity 设施
/// </summary>
[JsonProperty("amenity")]
public string Amenity { get; set; }

/// <summary>
/// Military 军事区
/// </summary>
[JsonProperty("military")]
public string Military { get; set; }

/// <summary>
/// Building 建筑
/// </summary>
[JsonProperty("building")]
public string Building { get; set; }
}
}
6 changes: 1 addition & 5 deletions src/Nominatim.API/Nominatim.API.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="../../Version.props" />
<PropertyGroup>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Christopher Flanagan</Authors>
Expand All @@ -8,11 +8,7 @@
<PackageProjectUrl>https://github.com/f1ana/Nominatim.API</PackageProjectUrl>
<RepositoryUrl>https://github.com/f1ana/Nominatim.API</RepositoryUrl>
<PackageTags>nominatim, osm, geocode, geocoding</PackageTags>
<Version>2.1.0</Version>
<PackageLicenseUrl>https://github.com/f1ana/Nominatim.API/blob/master/LICENSE</PackageLicenseUrl>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
<FileVersion>2.1.0.0</FileVersion>
<PackageVersion>2.1.0</PackageVersion>
<TargetFrameworks>net8.0;netstandard2.0</TargetFrameworks>
</PropertyGroup>

Expand Down