diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml
index ef1c9ec..d66f109 100644
--- a/.github/workflows/dotnet.yml
+++ b/.github/workflows/dotnet.yml
@@ -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 }}
+
diff --git a/Version.props b/Version.props
new file mode 100644
index 0000000..3c85f6d
--- /dev/null
+++ b/Version.props
@@ -0,0 +1,5 @@
+
+
+ 2.0.0
+
+
\ No newline at end of file
diff --git a/src/Nominatim.API/Models/AddressResult.cs b/src/Nominatim.API/Models/AddressResult.cs
index 21887eb..68bb16e 100644
--- a/src/Nominatim.API/Models/AddressResult.cs
+++ b/src/Nominatim.API/Models/AddressResult.cs
@@ -9,13 +9,13 @@ public class AddressResult {
public string Country { get; set; }
///
- /// Country code
+ /// Country code
///
[JsonProperty("country_code")]
public string CountryCode { get; set; }
///
- /// County name
+ /// County name 县
///
[JsonProperty("county")]
public string County { get; set; }
@@ -45,22 +45,25 @@ public class AddressResult {
public string State { get; set; }
///
- /// Town Name
+ /// Town Name 城镇
///
[JsonProperty("town")]
public string Town { get; set; }
+ ///
+ /// Pedestrian 步行
+ ///
[JsonProperty("pedestrian")]
public string Pedestrian { get; set; }
///
- /// Neighbourhood
+ /// Neighbourhood 街区
///
[JsonProperty("neighbourhood")]
public string Neighborhood { get; set; }
///
- /// Hamlet
+ /// Hamlet 村庄
///
[JsonProperty("hamlet")]
public string Hamlet { get; set; }
@@ -72,7 +75,7 @@ public class AddressResult {
public string Suburb { get; set; }
///
- /// Village Name
+ /// Village Name 村庄
///
[JsonProperty("village")]
public string Village { get; set; }
@@ -90,9 +93,9 @@ public class AddressResult {
public string Region { get; set; }
///
- /// District Name
+ /// District Name 区
///
- [JsonProperty("state_district")]
+ [JsonProperty("district")]
public string District { get; set; }
///
@@ -102,21 +105,45 @@ public class AddressResult {
public string Name { get; set; }
///
- /// Tourism
+ /// Tourism 旅游区
///
[JsonProperty("tourism")]
public string Tourism { get; set; }
///
- /// Municipality
+ /// Municipality 市
///
[JsonProperty("municipality")]
public string Municipality { get; set; }
///
- /// Quarter
+ /// Quarter 街区
///
[JsonProperty("quarter")]
public string Quarter { get; set; }
+
+ ///
+ /// Residential 住宅区
+ ///
+ [JsonProperty("residential")]
+ public string Residential { get; set; }
+
+ ///
+ /// Amenity 设施
+ ///
+ [JsonProperty("amenity")]
+ public string Amenity { get; set; }
+
+ ///
+ /// Military 军事区
+ ///
+ [JsonProperty("military")]
+ public string Military { get; set; }
+
+ ///
+ /// Building 建筑
+ ///
+ [JsonProperty("building")]
+ public string Building { get; set; }
}
}
\ No newline at end of file
diff --git a/src/Nominatim.API/Nominatim.API.csproj b/src/Nominatim.API/Nominatim.API.csproj
index bc471fa..6148e1b 100644
--- a/src/Nominatim.API/Nominatim.API.csproj
+++ b/src/Nominatim.API/Nominatim.API.csproj
@@ -1,5 +1,5 @@
-
+
true
Christopher Flanagan
@@ -8,11 +8,7 @@
https://github.com/f1ana/Nominatim.API
https://github.com/f1ana/Nominatim.API
nominatim, osm, geocode, geocoding
- 2.1.0
https://github.com/f1ana/Nominatim.API/blob/master/LICENSE
- 2.1.0.0
- 2.1.0.0
- 2.1.0
net8.0;netstandard2.0