Skip to content

Commit 52fdc50

Browse files
authored
Refactor Azure workflow for AuralizeBlazor deployment
Updated the Azure workflow for building and deploying an ASP.NET Core app, including changes to job names and artifact handling.
1 parent ff815e0 commit 52fdc50

File tree

1 file changed

+21
-25
lines changed

1 file changed

+21
-25
lines changed

.github/workflows/master_auralizeblazor.yml

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,66 @@
11
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
22
# More GitHub Actions for Azure: https://github.com/Azure/actions
33

4-
name: Build and deploy ASP.NET Core app to Azure Web App - AuralizeBlazor
4+
name: Build and deploy ASP.Net Core app to Azure Web App - AuralizeBlazor
55

66
on:
77
push:
88
branches:
99
- master
1010
workflow_dispatch:
1111

12-
env:
13-
PROJECT_PATH: Sample/AuralizeBlazor.Sample/AuralizeBlazor.Sample.csproj
14-
PUBLISH_DIR: ${{ runner.temp }}/publish
15-
1612
jobs:
1713
build:
1814
runs-on: windows-latest
1915
permissions:
20-
contents: read
16+
contents: read #This is required for actions/checkout
2117

2218
steps:
23-
- name: Checkout
24-
uses: actions/checkout@v4
19+
- uses: actions/checkout@v4
2520

26-
- name: Set up .NET SDK
21+
- name: Set up .NET Core
2722
uses: actions/setup-dotnet@v4
28-
with:
29-
dotnet-version: '8.0.x'
23+
with:
24+
dotnet-version: '8.0.x'
3025

3126
- name: Restore
32-
run: dotnet restore "${{ env.PROJECT_PATH }}"
27+
run: dotnet restore "Sample/AuralizeBlazor.Sample/AuralizeBlazor.Sample.csproj"
3328

34-
- name: Build (Release)
35-
run: dotnet build "${{ env.PROJECT_PATH }}" --configuration Release --no-restore
29+
- name: Build with dotnet
30+
run: dotnet build "Sample/AuralizeBlazor.Sample/AuralizeBlazor.Sample.csproj" --configuration Release --no-restore
3631

37-
- name: Publish
38-
run: dotnet publish "${{ env.PROJECT_PATH }}" -c Release -o "${{ env.PUBLISH_DIR }}" --no-build
32+
- name: dotnet publish
33+
run: dotnet publish "Sample/AuralizeBlazor.Sample/AuralizeBlazor.Sample.csproj" -c Release -o "./publish" --no-build
3934

40-
- name: Upload artifact for deployment
35+
- name: Upload artifact for deployment job
4136
uses: actions/upload-artifact@v4
4237
with:
43-
name: dotnet-publish
44-
path: ${{ env.PUBLISH_DIR }}
38+
name: .net-app
39+
path: ./publish
4540

4641
deploy:
4742
runs-on: windows-latest
4843
needs: build
4944
permissions:
50-
id-token: write
51-
contents: read
45+
id-token: write #This is required for requesting the JWT
46+
contents: read #This is required for actions/checkout
5247

5348
steps:
54-
- name: Download build artifact
49+
- name: Download artifact from build job
5550
uses: actions/download-artifact@v4
5651
with:
57-
name: dotnet-publish
52+
name: .net-app
5853
path: ./publish
59-
60-
- name: Login to Azure (OIDC)
54+
55+
- name: Login to Azure
6156
uses: azure/login@v2
6257
with:
6358
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_5966A2E7DF5A439C8FF34EA3A3FEA2F7 }}
6459
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_42FDABC6DA9F44E598B049B87B6EA726 }}
6560
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_098A55B73585475DB51124C1729752A8 }}
6661

6762
- name: Deploy to Azure Web App
63+
id: deploy-to-webapp
6864
uses: azure/webapps-deploy@v3
6965
with:
7066
app-name: 'AuralizeBlazor'

0 commit comments

Comments
 (0)