File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ version : 2
2+ updates :
3+ - package-ecosystem : nuget
4+ directories :
5+ - " /DevProxy.Hosting"
6+ schedule :
7+ interval : daily
8+
9+ - package-ecosystem : " github-actions"
10+ directory : " /"
11+ schedule :
12+ interval : daily
Original file line number Diff line number Diff line change 1+ name : Check PR
2+
3+ on : pull_request
4+
5+ jobs :
6+ build :
7+ name : Build
8+ runs-on : ubuntu-latest
9+ defaults :
10+ run :
11+ working-directory : DevProxy.Hosting
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v4
15+
16+ - name : Setup .NET
17+ uses : actions/setup-dotnet@v4
18+ with :
19+ dotnet-version : ' 9.0.x'
20+
21+ - name : Restore dependencies
22+ run : dotnet restore
23+
24+ - name : Build
25+ run : dotnet build --configuration Release --no-restore
26+
27+ - name : Pack
28+ run : dotnet pack --configuration Release --no-build --output ./nupkg
Original file line number Diff line number Diff line change 1+ name : Build and Publish
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ jobs :
9+ build-and-publish :
10+ name : Build and Publish
11+ runs-on : ubuntu-latest
12+ defaults :
13+ run :
14+ working-directory : DevProxy.Hosting
15+ steps :
16+ - name : Checkout code
17+ uses : actions/checkout@v4
18+
19+ - name : Setup .NET
20+ uses : actions/setup-dotnet@v4
21+ with :
22+ dotnet-version : ' 9.0.x'
23+
24+ - name : Restore dependencies
25+ run : dotnet restore
26+
27+ - name : Get version from tag
28+ id : get_version
29+ run : echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
30+
31+ - name : Update version in .csproj
32+ run : |
33+ sed -i 's|<Version>.*</Version>|<Version>${{ steps.get_version.outputs.VERSION }}</Version>|' DevProxy.Hosting.csproj
34+
35+ - name : Build
36+ run : dotnet build --configuration Release --no-restore
37+
38+ - name : Pack
39+ run : dotnet pack --configuration Release --no-build --output ./nupkg
40+
41+ - name : Debug NuGet API Key
42+ run : echo "NUGET_API_KEY_HASH=$(echo -n ${{ secrets.NUGET_API_KEY }} | sha256sum)" >> $GITHUB_ENV
43+
44+ - name : Print NuGet API Key Hash
45+ run : ' echo "NuGet API Key Hash: $NUGET_API_KEY_HASH"'
46+
47+ - name : Push to NuGet
48+ run : dotnet nuget push ./nupkg/DevProxy.Hosting.${{ steps.get_version.outputs.VERSION }}.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
Original file line number Diff line number Diff line change 1+ bin
2+ obj
3+ nupkg
4+ .secrets
5+ .DS_Store
Original file line number Diff line number Diff line change 1+ {
2+ "version" : " 0.2.0" ,
3+ "configurations" : [
4+ {
5+ "name" : " .NET Core Launch (console)" ,
6+ "type" : " coreclr" ,
7+ "request" : " launch" ,
8+ "preLaunchTask" : " build" ,
9+ "program" : " ${workspaceFolder}/DevProxy.Hosting/bin/Debug/net9.0/DevProxy.Hosting.dll" ,
10+ "args" : [],
11+ "cwd" : " ${workspaceFolder}/DevProxy.Hosting" ,
12+ "console" : " internalConsole" ,
13+ "stopAtEntry" : false ,
14+ },
15+ {
16+ "name" : " .NET Core Attach" ,
17+ "type" : " coreclr" ,
18+ "request" : " attach"
19+ }
20+ ]
21+ }
Original file line number Diff line number Diff line change 1+ {
2+ "version" : " 2.0.0" ,
3+ "tasks" : [
4+ {
5+ "label" : " build" ,
6+ "command" : " dotnet" ,
7+ "type" : " process" ,
8+ "args" : [
9+ " build" ,
10+ " ${workspaceFolder}/DevProxy.Hosting/DevProxy.Hosting.csproj" ,
11+ " /property:GenerateFullPaths=true" ,
12+ " /consoleloggerparameters:NoSummary;ForceNoAlign"
13+ ],
14+ "problemMatcher" : " $msCompile" ,
15+ "group" : {
16+ "kind" : " build" ,
17+ "isDefault" : true
18+ }
19+ },
20+ {
21+ "label" : " publish" ,
22+ "command" : " dotnet" ,
23+ "type" : " process" ,
24+ "args" : [
25+ " publish" ,
26+ " ${workspaceFolder}/DevProxy.Hosting/DevProxy.Hosting.csproj" ,
27+ " /property:GenerateFullPaths=true" ,
28+ " /consoleloggerparameters:NoSummary;ForceNoAlign"
29+ ],
30+ "problemMatcher" : " $msCompile"
31+ },
32+ {
33+ "label" : " watch" ,
34+ "command" : " dotnet" ,
35+ "type" : " process" ,
36+ "args" : [
37+ " watch" ,
38+ " run" ,
39+ " --project" ,
40+ " ${workspaceFolder}/DevProxy.Hosting/DevProxy.Hosting.csproj"
41+ ],
42+ "problemMatcher" : " $msCompile"
43+ }
44+ ]
45+ }
Original file line number Diff line number Diff line change 1+ <Project Sdk =" Microsoft.NET.Sdk" >
2+
3+ <PropertyGroup >
4+ <TargetFramework >net9.0</TargetFramework >
5+ <ImplicitUsings >enable</ImplicitUsings >
6+ <Nullable >enable</Nullable >
7+ <Version >0.1.0</Version >
8+ <Authors >Dev Proxy</Authors >
9+ <Title >Dev Proxy .NET Aspire extensions</Title >
10+ <Description >.NET Aspire extensions for adding Dev Proxy as a resource to your .NET Aspire application.</Description >
11+ <PackageId >DevProxy.Hosting</PackageId >
12+ <PackageTags >devproxy;aspire;dotnet</PackageTags >
13+ <PackageLicenseExpression >MIT</PackageLicenseExpression >
14+ <PackageProjectUrl >https://aka.ms/devproxy</PackageProjectUrl >
15+ <RepositoryUrl >https://github.com/waldekmastykarz/dev-proxy-aspire</RepositoryUrl >
16+ <RepositoryType >git</RepositoryType >
17+ <PackageReadmeFile >README.md</PackageReadmeFile >
18+ <PackageIcon >icon.png</PackageIcon >
19+ <GenerateDocumentationFile >true</GenerateDocumentationFile >
20+ </PropertyGroup >
21+
22+ <ItemGroup >
23+ <None Include =" ..\README.md" Pack =" true" PackagePath =" \" />
24+ <None Include =" ..\assets\icon.png" Pack =" true" PackagePath =" \" />
25+ </ItemGroup >
26+
27+ <ItemGroup >
28+ <PackageReference Include =" Aspire.Hosting" Version =" 9.2.1" />
29+ </ItemGroup >
30+
31+ </Project >
Original file line number Diff line number Diff line change 1+ using Aspire . Hosting . ApplicationModel ;
2+
3+ namespace DevProxy . Hosting ;
4+
5+ /// <summary>
6+ /// Exposes Dev Proxy as a Docker container.
7+ /// </summary>
8+ public sealed class DevProxyContainerResource ( string name ) :
9+ ContainerResource ( name )
10+ {
11+ }
Original file line number Diff line number Diff line change 1+ using Aspire . Hosting . ApplicationModel ;
2+
3+ namespace DevProxy . Hosting ;
4+
5+ /// <summary>
6+ /// Exposes Dev Proxy through its locally installed executable.
7+ /// </summary>
8+ public sealed class DevProxyExecutableResource ( string name ) :
9+ ExecutableResource ( name , "devproxy" , "" )
10+ {
11+ }
Original file line number Diff line number Diff line change 1+ namespace DevProxy . Hosting ;
2+
3+ /// <summary>
4+ /// Contains constants and shared resources related to Dev Proxy.
5+ /// </summary>
6+ public static class DevProxyResource
7+ {
8+ /// <summary>
9+ /// The name of the Dev Proxy proxy endpoint.
10+ /// </summary>
11+ public static readonly string ProxyEndpointName = "proxy" ;
12+
13+ /// <summary>
14+ /// The name of the Dev Proxy API endpoint.
15+ /// </summary>
16+ public static readonly string ApiEndpointName = "api" ;
17+ }
You can’t perform that action at this time.
0 commit comments