Skip to content

Commit 5da1ab5

Browse files
committed
chore: update GitHub Actions workflow for improved structure and consistency
1 parent c0062f9 commit 5da1ab5

1 file changed

Lines changed: 16 additions & 8 deletions

File tree

.github/workflows/dotnet.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@
22
name: Build
33

44
on:
5+
workflow_dispatch:
56
push:
7+
branches:
8+
- main
69
pull_request:
710
types: [opened, synchronize, reopened]
811
branches: [main]
912
paths-ignore:
10-
- ".github/workflows/**"
1113
- "**/*.md"
12-
- "**/*.yml"
14+
15+
permissions:
16+
contents: read
1317

1418
env:
1519
DOTNET_NOLOGO: true
@@ -18,19 +22,23 @@ env:
1822

1923
jobs:
2024
build-and-test:
21-
name: build-and-test-${{matrix.os}}
25+
name: build-and-test-${{ matrix.os }}
2226
runs-on: ${{ matrix.os }}
27+
timeout-minutes: 30
2328
strategy:
29+
fail-fast: false
2430
matrix:
25-
os: [ubuntu-latest, windows-latest, macOS-latest]
31+
os: [ubuntu-latest, windows-latest, macos-latest]
2632

2733
steps:
28-
- uses: actions/checkout@v6
34+
- name: Checkout repository
35+
uses: actions/checkout@v7.0.0
2936

30-
- name: Setup .NET
31-
uses: actions/setup-dotnet@v5
37+
- name: Setup .NET SDK
38+
uses: actions/setup-dotnet@v5.4.0
3239
with:
33-
dotnet-version: "10.0.x"
40+
global-json-file: global.json
41+
cache: true
3442

3543
- name: Restore dependencies
3644
run: dotnet restore Shop.slnx

0 commit comments

Comments
 (0)