Skip to content

Commit eb35574

Browse files
Merge pull request #31 from naeemaei/master
Remove .nuspec file and add readme file to CSPROJ file
2 parents 3cb5478 + 9dea271 commit eb35574

File tree

3 files changed

+20
-118
lines changed

3 files changed

+20
-118
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
name: .NET Release
2-
32
on:
43
push:
54
tags:
65
- "v[0-9]+.[0-9]+.[0-9]+"
7-
paths:
8-
- 'HttpClientToCurl.nuspec'
96
jobs:
107
build:
118
runs-on: ubuntu-latest
@@ -26,24 +23,11 @@ jobs:
2623
- name: Test
2724
run: dotnet test --configuration Release /p:Version=${VERSION} --no-build
2825
working-directory: src/HttpClientToCurl
29-
30-
publish:
31-
name: Publish to NuGet.org
32-
33-
runs-on: ubuntu-latest
34-
35-
steps:
36-
- uses: actions/checkout@v3
37-
name: Checkout code
38-
39-
- uses: nuget/setup-nuget@v1
40-
name: Setup NuGet
41-
with:
42-
nuget-version: '6.x'
43-
44-
- name: Create the package
45-
working-directory: ./
46-
run: nuget pack HttpClientToCurl.nuspec -NoDefaultExcludes
47-
48-
- name: Publish the package
49-
run: nuget push *.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}} -SkipDuplicate
26+
- name: Pack
27+
run: dotnet pack --configuration Release /p:Version=${VERSION} --no-build --output .
28+
working-directory: src/HttpClientToCurl
29+
- name: Push
30+
run: dotnet nuget push HttpClientToCurl.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${GITHUB_TOKEN}
31+
working-directory: src/HttpClientToCurl
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.NUGET_API_KEY }}

HttpClientToCurl.nuspec

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/HttpClientToCurl/HttpClientToCurl.csproj

Lines changed: 12 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -8,66 +8,18 @@
88
<ImplicitUsings>enable</ImplicitUsings>
99
<Nullable>disable</Nullable>
1010
<LangVersion>latest</LangVersion>
11-
<Description>
12-
This extension will help you see whatever is set in HttpClient as a curl script.
13-
Sometimes we may want to connect with an external service provider but when calling we come across many errors and we should spend a lot of time resolving errors. It happened to me many times;
14-
for example, the external service provider expects properties a request to be sent to it in the form of The Camel case but we send data to it in the form of The Pascal Case. after much investigation, we have realized this issue. Or it is possible we forget to send one Property or a Header or we made a mistake in filling in the value of a Header or Property
15-
and many issues like these, which we spent a lot of time resolving.
16-
this extension makes our work very easy.
17-
Before sending data to the service provider, this extension can show us exactly what we send it. (in the form of a curl in the console or in the file).
18-
After getting the curl, we can now call it in the terminal or import it in the Postman and check with the documents provided by the provider.
19-
20-
You have 3 ways to see script results:
21-
22-
1- Print in the console:
23-
24-
httpClient.GenerateCurlInConsole(httpRequestMessage, null);
25-
26-
2- Write in a file:
27-
28-
httpClient.GenerateCurlInFile(httpRequestMessage, null);
29-
30-
3- Put into a variable:
31-
32-
string script = httpClient.GenerateCurlInString(httpRequestMessage, null);
33-
34-
Read more about this extension:
35-
https://medium.com/@amin.golmahalle/how-to-generate-curl-script-of-the-httpclient-in-net-c539da7c6588
36-
37-
Source Address:
38-
https://github.com/amingolmahalle/HttpClientToCurlGenerator
39-
</Description>
40-
41-
<PackageReleaseNotes>
42-
This extension will help you see whatever is set in HttpClient as a curl script.
43-
Sometimes we may want to connect with an external service provider but when calling we come across many errors and we should spend a lot of time resolving errors. It happened to me many times;
44-
for example, the external service provider expects properties a request to be sent to it in the form of The Camel case but we send data to it in the form of The Pascal Case. after much investigation, we have realized this issue. Or it is possible we forget to send one Property or a Header or we made a mistake in filling in the value of a Header or Property
45-
and many issues like these, which we spent a lot of time resolving.
46-
this extension makes our work very easy.
47-
Before sending data to the service provider, this extension can show us exactly what we send it. (in the form of a curl in the console or in the file).
48-
After getting the curl, we can now call it in the terminal or import it in the Postman and check with the documents provided by the provider.
49-
50-
You have 3 ways to see script results:
51-
52-
1- Print in the console:
53-
54-
httpClient.GenerateCurlInConsole(httpRequestMessage, null);
55-
56-
2- Write in a file:
57-
58-
httpClient.GenerateCurlInFile(httpRequestMessage, null);
59-
60-
3- Put into a variable:
61-
62-
string script = httpClient.GenerateCurlInString(httpRequestMessage, null);
63-
64-
Read more about this extension:
65-
https://medium.com/@amin.golmahalle/how-to-generate-curl-script-of-the-httpclient-in-net-c539da7c6588
66-
67-
Source Address:
68-
https://github.com/amingolmahalle/HttpClientToCurlGenerator
69-
70-
</PackageReleaseNotes>
11+
<PackageReadmeFile>README.md</PackageReadmeFile>
12+
<Description>This extension will help you to see whatever is set in **HttpClient** in the form of a curl script.</Description>
13+
<PackageTags>package json extension csharp dotnet curl aspnetcore nuget xml dotnetcore httpclient postman dotnet-core aspnet-core asp-net-core asp-net dotnet-standard nuget-package asp-net-core-web-api httpclients</PackageTags>
14+
<PackageProjectUrl>https://github.com/amingolmahalle/HttpClientToCurlGenerator</PackageProjectUrl>
15+
<RepositoryUrl>https://github.com/amingolmahalle/HttpClientToCurlGenerator</RepositoryUrl>
16+
<RepositoryType>git</RepositoryType>
17+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
18+
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
7119
</PropertyGroup>
7220

21+
<ItemGroup>
22+
<None Include="../../README.md" Pack="True" Visible="False" PackagePath="" />
23+
</ItemGroup>
24+
7325
</Project>

0 commit comments

Comments
 (0)