File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818 - name : Get the version
1919 id : get_version
2020 run : echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
21-
22- - name : Install NET 7
23- uses : actions/setup-dotnet@v2
24- with :
25- dotnet-version : ' 7.0.x'
26-
21+
2722 - name : Restore Nuget Packages
2823 run : dotnet restore TransactionProcessor.sln --source https://api.nuget.org/v3/index.json --source https://www.myget.org/F/transactionprocessing/api/v3/index.json
2924
5752
5853 - name : Publish API
5954 if : ${{ github.event.release.prerelease == false }}
60- run : dotnet publish "TransactionProcessor\TransactionProcessor.csproj" --configuration Release --output publishOutput
55+ run : dotnet publish "TransactionProcessor\TransactionProcessor.csproj" --configuration Release --output publishOutput -r win-x64 --self-contained
6156
6257 - name : Install Octopus CLI
6358 if : ${{ github.event.release.prerelease == false }}
Original file line number Diff line number Diff line change 4444 - name : Set Up Variables
4545 run : echo "action_url=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_ENV
4646
47- - name : Install NET 7
48- uses : actions/setup-dotnet@v2
49- with :
50- dotnet-version : ' 7.0.101'
51-
5247 - name : Restore Nuget Packages
5348 run : dotnet restore TransactionProcessor.sln --source https://api.nuget.org/v3/index.json --source https://www.myget.org/F/transactionprocessing/api/v3/index.json
5449
Original file line number Diff line number Diff line change 1616 steps :
1717 - uses : actions/checkout@v2.3.4
1818
19- - name : Install NET 7
20- uses : actions/setup-dotnet@v2
21- with :
22- dotnet-version : ' 7.0.x'
23-
2419 - name : Restore Nuget Packages
2520 run : dotnet restore TransactionProcessor.sln --source https://api.nuget.org/v3/index.json --source https://www.myget.org/F/transactionprocessing/api/v3/index.json
2621
Original file line number Diff line number Diff line change 1919 with :
2020 fetch-depth : 0
2121
22- - name : Install NET 7
23- uses : actions/setup-dotnet@v2
24- with :
25- dotnet-version : ' 7.0.x'
26-
2722 - name : Restore Nuget Packages
2823 run : dotnet restore TransactionProcessor.sln --source https://api.nuget.org/v3/index.json --source https://www.myget.org/F/transactionprocessing/api/v3/index.json
2924
Original file line number Diff line number Diff line change @@ -32,15 +32,16 @@ public static void Main(string[] args)
3232
3333 public static IHostBuilder CreateHostBuilder ( string [ ] args )
3434 {
35- Console . Title = "Transaction Processor" ;
36-
3735 //At this stage, we only need our hosting file for ip and ports
38- IConfigurationRoot config = new ConfigurationBuilder ( ) . SetBasePath ( Directory . GetCurrentDirectory ( ) )
36+ FileInfo fi = new FileInfo ( System . Reflection . Assembly . GetExecutingAssembly ( ) . Location ) ;
37+
38+ IConfigurationRoot config = new ConfigurationBuilder ( ) . SetBasePath ( fi . Directory . FullName )
3939 . AddJsonFile ( "hosting.json" , optional : true )
4040 . AddJsonFile ( "hosting.development.json" , optional : true )
4141 . AddEnvironmentVariables ( ) . Build ( ) ;
4242
4343 IHostBuilder hostBuilder = Host . CreateDefaultBuilder ( args ) ;
44+ hostBuilder . UseWindowsService ( ) ;
4445 hostBuilder . UseLamar ( ) ;
4546 hostBuilder . ConfigureWebHostDefaults ( webBuilder =>
4647 {
Original file line number Diff line number Diff line change 4343 <PackageReference Include =" Swashbuckle.AspNetCore.Swagger" Version =" 6.4.0" />
4444 <PackageReference Include =" Swashbuckle.AspNetCore.SwaggerGen" Version =" 6.4.0" />
4545 <PackageReference Include =" Swashbuckle.AspNetCore.SwaggerUI" Version =" 6.4.0" />
46+ <PackageReference Include =" Microsoft.Extensions.Hosting.WindowsServices" Version =" 7.0.0" />
4647 </ItemGroup >
4748
4849 <ItemGroup >
You can’t perform that action at this time.
0 commit comments