Skip to content

refactor: Update request classes to use record types #3

refactor: Update request classes to use record types

refactor: Update request classes to use record types #3

Workflow file for this run

name: Publish
on:
workflow_dispatch:
push:
branches: [ master, main ]
env:
AZURE_WEBAPP_NAME: 'generatecode' # set this to your application's name
AZURE_WEBAPP_PACKAGE_PATH: './publish_output' # set this to the path to your web app project, defaults to the repository root
BUILD_CONFIGURATION: 'Release' # set this to the appropriate build configuration
DOTNET_VERSION: '8.x.x' # set this to the dotnet version to use
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{env.DOTNET_VERSION}}
- name: Restore - Install dependencies
run: dotnet restore ./GenerateCampaignCode.sln
- name: Build with dotnet
run: dotnet build ./GenerateCampaignCode.sln --configuration ${{env.BUILD_CONFIGURATION}} --no-restore
- name: Test with dotnet
run: dotnet test ./GenerateCampaignCode.Tests/GenerateCampaignCode.Tests.csproj --configuration ${{env.BUILD_CONFIGURATION}} --verbosity normal
- name: Publish with dotnet
run: dotnet publish ./src/Api/GenerateCampaignCode.Api.csproj --configuration ${{env.BUILD_CONFIGURATION}} --no-build --output ${{env.AZURE_WEBAPP_PACKAGE_PATH}}
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: WebApiCICDWorkFlow_Production
path: ${{env.AZURE_WEBAPP_PACKAGE_PATH}}
- name: Deploy to Azure Web App
uses: azure/webapps-deploy@v3
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.AZURE_PUBLISH_PROFILE }}
package: ${{env.AZURE_WEBAPP_PACKAGE_PATH}}