try #28
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
# Birder\bin\publish | |
# deploying Deploying "Birder\bin\publish" instead of selected folder "Birder". Use "appService.deploySubpath" to change this behavior. | |
name: publish | |
on: | |
push: | |
branches: [ master ] | |
env: | |
AZURE_WEBAPP_NAME: birder-server | |
AZURE_WEBAPP_PACKAGE_PATH: '.' | |
DOTNET_VERSION: 9.0.x | |
jobs: | |
publish: | |
runs-on: windows-latest # ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ env.DOTNET_VERSION }} | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: | | |
cd Birder | |
dotnet build --no-restore | |
dotnet publish -c Release -o ./bin/publish | |
# dotnet publish -c Release -o ../dotnet-webapp -r linux-x64 --self-contained true /p:UseAppHost=true | |
- name: Test | |
run: | | |
cd Birder.Tests | |
dotnet test --no-restore --verbosity normal | |
# run: dotnet test --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover --settings birder.tests/coverlet.runsettings.xml | |
- uses: azure/webapps-deploy@v2 | |
name: Deploy | |
with: | |
app-name: birder-server | |
publish-profile: ${{ secrets.AZURE_PUBLISH_PROFILE }} | |
package: '${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/Birder/bin/publish' |