Skip to content

Commit 27fee72

Browse files
committed
Update workflows for clarity and action version upgrades
Refactor `if` condition in `static-web-app.yml` to improve readability and explicitly handle `workflow_dispatch` and `pull_request` events. Upgrade `actions/checkout` to v5 and `actions/setup-dotnet` to v5 in `static-web-app.yml`. Remove `actions/setup-dotnet`, `dotnet build`, and `dotnet publish` steps from `web-app.yml` to streamline the workflow.
1 parent 5bb120b commit 27fee72

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/static-web-app.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,21 @@ on:
1818

1919
jobs:
2020
build_and_deploy_job:
21-
if: ${{ inputs.prod_release }} || (github.event_name == 'pull_request' && github.event.action != 'closed')
21+
# Run when:
22+
# - workflow_dispatch AND prod_release == true
23+
# - OR pull_request (except when closed)
24+
if: >
25+
(github.event_name == 'workflow_dispatch' && github.event.inputs.prod_release == 'true') ||
26+
(github.event_name == 'pull_request' && github.event.action != 'closed')
2227
runs-on: ubuntu-latest
2328
name: Build and Deploy Job
2429
steps:
25-
- uses: actions/checkout@v4
30+
- uses: actions/checkout@v5
2631
with:
2732
submodules: true
2833

2934
- name: Setup .NET SDK
30-
uses: actions/setup-dotnet@v3
35+
uses: actions/setup-dotnet@v5
3136
with:
3237
dotnet-version: '10.0.x'
3338

.github/workflows/web-app.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ jobs:
2323
uses: actions/setup-dotnet@v3
2424
with:
2525
dotnet-version: '10.0.x'
26-
include-prerelease: false
2726

2827
- name: Build
2928
run: dotnet build ./BlazorBootstrap.Demo.Server/BlazorBootstrap.Demo.Server.csproj --configuration Release

0 commit comments

Comments
 (0)