update to net 9 #30
This file contains 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: Build and deploy .NET Core application to Web App YelpApiWeb | |
on: | |
push: | |
branches: | |
- main | |
env: | |
AZURE_WEBAPP_NAME: YelpApiWeb | |
AZURE_WEBAPP_PACKAGE_PATH: Yelp.Api.Web/published | |
CONFIGURATION: Release | |
DOTNET_CORE_VERSION: 8.x | |
WORKING_DIRECTORY: Yelp.Api.Web | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: ${{ env.DOTNET_CORE_VERSION }} | |
include-prerelease: true | |
- name: Restore | |
run: dotnet restore "${{ env.WORKING_DIRECTORY }}" | |
- name: Build | |
run: dotnet build "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-restore | |
- name: Test | |
run: dotnet test "${{ env.WORKING_DIRECTORY }}" --no-build | |
- name: Publish | |
run: dotnet publish "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-build --output "${{ env.AZURE_WEBAPP_PACKAGE_PATH }}" |