Skip to content

Updated JosephGuadagno.Utilities.Web package #19

Updated JosephGuadagno.Utilities.Web package

Updated JosephGuadagno.Utilities.Web package #19

# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions
name: Publish API App to Azure - api-jjgnet-broadcast
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.x'
include-prerelease: true
- name: Build with dotnet
run: dotnet build ./src/JosephGuadagno.Broadcasting.Api --configuration Release
- name: dotnet publish
run: dotnet publish ./src/JosephGuadagno.Broadcasting.Api -c Release -o ${{env.DOTNET_ROOT}}/api-jjgnet-broadcast
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v3
with:
name: .api-app
path: ${{env.DOTNET_ROOT}}/api-jjgnet-broadcast
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
permissions:
id-token: write #This is required for requesting the JWT
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v3
with:
name: .api-app
- name: Login to Azure
uses: azure/login@v1
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_8BDDFE67FC8140A3A709CCB70B544670 }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_92748078D9F9499F82755D8113CE31AC }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_4781070EFCDA44E99A9F36E5F1B410DD }}
- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'api-jjgnet-broadcast'
slot-name: 'Production'
package: .