February 2025 Release #70
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| buildlinux: | |
| name: "Release" | |
| env: | |
| ASPNETCORE_ENVIRONMENT: "Production" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - name: Get the version | |
| id: get_version | |
| run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | |
| - name: Restore Nuget Packages | |
| run: | | |
| dotnet restore TransactionProcessor.HealthChecksUI/TransactionProcessor.HealthChecksUI.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }} | |
| dotnet restore TransactionProcessing.SchedulerService/TransactionProcessing.SchedulerService.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }} | |
| - name: Build Code | |
| run: | | |
| dotnet build TransactionProcessor.HealthChecksUI/TransactionProcessor.HealthChecksUI.sln --configuration Release | |
| dotnet build TransactionProcessing.SchedulerService/TransactionProcessing.SchedulerService.sln --configuration Release | |
| - name: Publish API | |
| run: | | |
| dotnet publish "TransactionProcessor.HealthChecksUI/TransactionProcessor.HealthChecksUI/TransactionProcessor.HealthChecksUI.csproj" --configuration Release --output TransactionProcessor.HealthChecksUI/publishOutput -r win-x64 --self-contained | |
| dotnet publish "TransactionProcessing.SchedulerService/TransactionProcessing.SchedulerService/TransactionProcessing.SchedulerService.csproj" --configuration Release --output TransactionProcessing.SchedulerService/publishOutput -r win-x64 --self-contained | |
| - name: Build Release Package (Health Check UI) | |
| run: | | |
| cd /home/runner/work/SupportTools/SupportTools/TransactionProcessor.HealthChecksUI/publishOutput | |
| zip -r ../healthchecksui.zip ./* | |
| echo "Zip file created at: $(realpath ../healthchecksui.zip)" | |
| - name: Build Release Package (Scheduler Service) | |
| run: | | |
| cd /home/runner/work/SupportTools/SupportTools/TransactionProcessing.SchedulerService/publishOutput | |
| zip -r ../schedulerservice.zip ./* | |
| echo "Zip file created at: $(realpath ../schedulerservice.zip)" | |
| - name: Upload the artifact (Health Check UI) | |
| uses: actions/upload-artifact@v4.4.0 | |
| with: | |
| name: healthchecksui | |
| path: /home/runner/work/SupportTools/SupportTools/TransactionProcessor.HealthChecksUI/healthchecksui.zip | |
| - name: Upload the artifact (Scheduler Service) | |
| uses: actions/upload-artifact@v4.4.0 | |
| with: | |
| name: schedulerservice | |
| path: /home/runner/work/SupportTools/SupportTools/TransactionProcessing.SchedulerService/schedulerservice.zip | |
| deploystaging: | |
| runs-on: stagingserver | |
| needs: buildlinux | |
| environment: staging | |
| name: "Deploy to Staging" | |
| steps: | |
| - name: Download the artifact (Health Check UI) | |
| uses: actions/download-artifact@v4.1.8 | |
| with: | |
| name: healthchecksui | |
| - name: Remove existing Windows service (Health Check UI) | |
| run: | | |
| $serviceName = "Transaction Processing - Health Checks UI" | |
| # Check if the service exists | |
| if (Get-Service -Name $serviceName -ErrorAction SilentlyContinue) { | |
| Stop-Service -Name $serviceName | |
| sc.exe delete $serviceName | |
| } | |
| - name: Unzip the files (Health Check UI) | |
| run: | | |
| Expand-Archive -Path healthchecksui.zip -DestinationPath "C:\txnproc\transactionprocessing\supporttools\healthcheckui" -Force | |
| - name: Install as a Windows service (Health Check UI) | |
| run: | | |
| $serviceName = "Transaction Processing - Health Checks UI" | |
| $servicePath = "C:\txnproc\transactionprocessing\supporttools\healthcheckui\TransactionProcessor.HealthChecksUI.exe" | |
| New-Service -Name $serviceName -BinaryPathName $servicePath -Description "Transaction Processing - Health Checks UI" -DisplayName "Transaction Processing - Health Checks UI" -StartupType Automatic | |
| Start-Service -Name $serviceName | |
| - name: Download the artifact (Scheduler Service) | |
| uses: actions/download-artifact@v4.1.8 | |
| with: | |
| name: schedulerservice | |
| - name: Remove existing Windows service (Scheduler Service) | |
| run: | | |
| $serviceName = "Transaction Processing - Scheduler Service" | |
| # Check if the service exists | |
| if (Get-Service -Name $serviceName -ErrorAction SilentlyContinue) { | |
| Stop-Service -Name $serviceName | |
| sc.exe delete $serviceName | |
| } | |
| - name: Unzip the files (Scheduler Service) | |
| run: | | |
| Expand-Archive -Path schedulerservice.zip -DestinationPath "C:\txnproc\transactionprocessing\supporttools\schedulerservice" -Force | |
| - name: Install as a Windows service (Scheduler Service) | |
| run: | | |
| $serviceName = "Transaction Processing - Scheduler Service" | |
| $servicePath = "C:\txnproc\transactionprocessing\supporttools\schedulerservice\TransactionProcessing.SchedulerService.exe" | |
| New-Service -Name $serviceName -BinaryPathName $servicePath -Description "Transaction Processing - Scheduler Service" -DisplayName "Transaction Processing - Scheduler Service" -StartupType Automatic | |
| Start-Service -Name $serviceName | |
| deployproduction: | |
| runs-on: productionserver | |
| needs: [buildlinux, deploystaging] | |
| environment: production | |
| name: "Deploy to Production" | |
| steps: | |
| - name: Download the artifact (Health Check UI) | |
| uses: actions/download-artifact@v4.1.8 | |
| with: | |
| name: healthchecksui | |
| - name: Remove existing Windows service (Health Check UI) | |
| run: | | |
| $serviceName = "Transaction Processing - Health Checks UI" | |
| # Check if the service exists | |
| if (Get-Service -Name $serviceName -ErrorAction SilentlyContinue) { | |
| Stop-Service -Name $serviceName | |
| sc.exe delete $serviceName | |
| } | |
| - name: Unzip the files (Health Check UI) | |
| run: | | |
| Expand-Archive -Path healthchecksui.zip -DestinationPath "C:\txnproc\transactionprocessing\supporttools\healthcheckui" -Force | |
| - name: Install as a Windows service (Health Check UI) | |
| run: | | |
| $serviceName = "Transaction Processing - Health Checks UI" | |
| $servicePath = "C:\txnproc\transactionprocessing\supporttools\healthcheckui\TransactionProcessor.HealthChecksUI.exe" | |
| New-Service -Name $serviceName -BinaryPathName $servicePath -Description "Transaction Processing - Health Checks UI" -DisplayName "Transaction Processing - Health Checks UI" -StartupType Automatic | |
| Start-Service -Name $serviceName | |
| - name: Download the artifact (Scheduler Service) | |
| uses: actions/download-artifact@v4.1.8 | |
| with: | |
| name: schedulerservice | |
| - name: Remove existing Windows service (Scheduler Service) | |
| run: | | |
| $serviceName = "Transaction Processing - Scheduler Service" | |
| # Check if the service exists | |
| if (Get-Service -Name $serviceName -ErrorAction SilentlyContinue) { | |
| Stop-Service -Name $serviceName | |
| sc.exe delete $serviceName | |
| } | |
| - name: Unzip the files (Scheduler Service) | |
| run: | | |
| Expand-Archive -Path schedulerservice.zip -DestinationPath "C:\txnproc\transactionprocessing\supporttools\schedulerservice" -Force | |
| - name: Install as a Windows service (Scheduler Service) | |
| run: | | |
| $serviceName = "Transaction Processing - Scheduler Service" | |
| $servicePath = "C:\txnproc\transactionprocessing\supporttools\schedulerservice\TransactionProcessing.SchedulerService.exe" | |
| New-Service -Name $serviceName -BinaryPathName $servicePath -Description "Transaction Processing - Scheduler Service" -DisplayName "Transaction Processing - Scheduler Service" -StartupType Automatic | |
| Start-Service -Name $serviceName |