Skip to content

Merge branch 'release' into main #606

Merge branch 'release' into main

Merge branch 'release' into main #606

# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action
# More GitHub Actions for Azure: https://github.com/Azure/actions
name: TrashMobDev - FunctionApp
on:
push:
branches:
- main
paths:
- '.github/**'
- 'TrashMobJobs/**'
- 'TrashMob.Models/**'
- 'TrashMob.Shared/**'
- 'TrashMob.Shared.Tests/**'
workflow_dispatch:
env:
AZURE_FUNCTIONAPP_NAME: fa-tm-dev-westus2
AZURE_FUNCTIONAPP_PACKAGE_PATH: TrashMobJobs/publish
CONFIGURATION: Release
DOTNET_CORE_VERSION: 8.0.x
WORKING_DIRECTORY: TrashMobJobs
DOTNET_CORE_VERSION_INPROC: 8.0.x
jobs:
build-and-deploy:
runs-on: windows-latest
environment: test
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'
- name: Determine Version
id: version_step # step id used as reference for output values
uses: gittools/actions/gitversion/[email protected]
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_CORE_VERSION }}
- name: Setup .NET Core (for inproc extensions)
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_CORE_VERSION_INPROC }}
- name: Restore
run: dotnet restore "${{ env.WORKING_DIRECTORY }}"
- name: Publish
run: dotnet publish "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-restore --output "${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}"
- name: 'Run Azure Functions Action'
uses: Azure/functions-action@v1
id: fa
with:
app-name: 'fa-tm-dev-westus2'
slot-name: 'production'
package: '${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
publish-profile: ${{ secrets.AzureAppService_PublishProfile_98a8860f496e4feea3f4f70f508f3d16 }}