Skip to content

F!! Implement Fluently #45

F!! Implement Fluently

F!! Implement Fluently #45

name: Publish 🚀
on:
push:
branches: [ "main" ]
env:
DOTNET_VERSION_6: "6.x.x"
DOTNET_VERSION_8: "8.x.x"
AZURE_WEBAPP_NAME: "ex-fantasta"
AZURE_WEBAPP_PACKAGE_PATH: "./publish"
jobs:
Publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET6
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION_6 }}
- name: Setup .NET8
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION_8 }}
- name: Restore
run: dotnet restore ./FantaAstaServer.sln
- name: Build
run: dotnet build ./FantaAstaServer.sln -c Release --no-restore
- name: Test
run: dotnet test -c Release --no-build
- name: Publish
run: dotnet publish ./FantaAstaServer/FantaAstaServer.csproj -c Release --no-build --output '${{ env.AZURE_WEBAPP_PACKAGE_PATH }}'
- name: Deploy
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.AZURE_PUBLISH_PROFILE }}
package: "${{ env.AZURE_WEBAPP_PACKAGE_PATH }}"