Skip to content

2025.12.2

2025.12.2 #96

Workflow file for this run

name: Release
on:
release:
types: [published]
jobs:
build:
name: "Release"
env:
ASPNETCORE_ENVIRONMENT: "Production"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install NET 9
uses: actions/setup-dotnet@v4.0.1
with:
dotnet-version: '9.0.x'
- 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 }}
dotnet restore TransactionProcessing.MerchantPos/TransactionProcessing.MerchantPos.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }}
- name: Build Code
run: |
dotnet build TransactionProcessor.HealthChecksUI/TransactionProcessor.HealthChecksUI.sln --configuration Release
dotnet build TransactionProcessing.MerchantPos/TransactionProcessing.MerchantPos.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.MerchantPos/TransactionProcessing.MerchantPos.csproj" --configuration Release --output TransactionProcessing.MerchantPos/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: 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: Build Release Package (Merchant Pos)
run: |
cd /home/runner/work/SupportTools/SupportTools/TransactionProcessing.MerchantPos/publishOutput
zip -r ../merchantpos.zip ./*
echo "Zip file created at: $(realpath ../merchantpos.zip)"
- name: Upload the artifact (Merchant Pos)
uses: actions/upload-artifact@v4.4.0
with:
name: merchantpos
path: /home/runner/work/SupportTools/SupportTools/TransactionProcessing.MerchantPos/merchantpos.zip
deploystaging:
runs-on: [stagingserver, windows]
needs: build
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\healthchecksui" -Force
- name: Install as a Windows service (Health Check UI)
run: |
$serviceName = "Transaction Processing - Health Checks UI"
$servicePath = "C:\txnproc\transactionprocessing\healthchecksui\TransactionProcessor.HealthChecksUI.exe"
New-Service -Name $serviceName -BinaryPathName $servicePath -Description $serviceName -DisplayName $serviceName -StartupType Automatic
Start-Service -Name $serviceName
- name: Download the artifact (Merchant Pos)
uses: actions/download-artifact@v4.1.8
with:
name: merchantpos
- name: Remove existing Windows service (Merchant Pos)
run: |
$serviceName = "Transaction Processing - Merchant Pos"
# Check if the service exists
if (Get-Service -Name $serviceName -ErrorAction SilentlyContinue) {
Stop-Service -Name $serviceName
sc.exe delete $serviceName
}
- name: Unzip the files (Merchant Pos)
run: |
Expand-Archive -Path merchantpos.zip -DestinationPath "C:\txnproc\transactionprocessing\merchantpos" -Force
- name: Install as a Windows service (Merchant Pos)
run: |
$serviceName = "Transaction Processing - Merchant Pos"
$servicePath = "C:\txnproc\transactionprocessing\merchantpos\TransactionProcessing.MerchantPos.exe"
New-Service -Name $serviceName -BinaryPathName $servicePath -Description $serviceName -DisplayName $serviceName -StartupType Automatic
Start-Service -Name $serviceName
deployproduction:
runs-on: [productionserver, windows]
needs: [build, 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\healthchecksui" -Force
- name: Install as a Windows service (Health Check UI)
run: |
$serviceName = "Transaction Processing - Health Checks UI"
$servicePath = "C:\txnproc\transactionprocessing\healthchecksui\TransactionProcessor.HealthChecksUI.exe"
New-Service -Name $serviceName -BinaryPathName $servicePath -Description $serviceName -DisplayName $serviceName -StartupType Automatic
Start-Service -Name $serviceName
- name: Remove existing Windows service (Merchant Pos)
run: |
$serviceName = "Transaction Processing - Merchant Pos"
# Check if the service exists
if (Get-Service -Name $serviceName -ErrorAction SilentlyContinue) {
Stop-Service -Name $serviceName
sc.exe delete $serviceName
}
- name: Unzip the files (Merchant Pos)
run: |
Expand-Archive -Path merchantpos.zip -DestinationPath "C:\txnproc\transactionprocessing\merchantpos" -Force
- name: Install as a Windows service (Merchant Pos)
run: |
$serviceName = "Transaction Processing - Merchant Pos"
$servicePath = "C:\txnproc\transactionprocessing\merchantpos\TransactionProcessor.MerchantPos.exe"
New-Service -Name $serviceName -BinaryPathName $servicePath -Description $serviceName -DisplayName $serviceName -StartupType Automatic
Start-Service -Name $serviceName