Skip to content

Commit d2d1a73

Browse files
committed
just use two separate actions; run tests in publish also
1 parent a7f8804 commit d2d1a73

File tree

2 files changed

+26
-17
lines changed

2 files changed

+26
-17
lines changed

.github/workflows/publish-site.yml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,12 @@ on:
33
push:
44
branches:
55
- main # Default release branch
6-
pull_request:
76
workflow_dispatch:
87

98
jobs:
10-
test:
11-
name: Verify provided solutions
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@v3
15-
- name: restore submodules
16-
run: git submodule update --init
17-
- name: Setup .NET Core
18-
uses: actions/setup-dotnet@v2
19-
with:
20-
dotnet-version: 8.0.x
21-
- name: Install dependencies
22-
run: dotnet restore
23-
- name: Test
24-
run: dotnet test LearnJsonEverything.sln -c Release --no-restore
259
publish:
2610
name: pack & publish
2711
runs-on: ubuntu-latest
28-
if: github.ref == 'refs/heads/main'
2912
steps:
3013
- uses: actions/checkout@v3
3114
- name: restore submodules
@@ -38,6 +21,8 @@ jobs:
3821
run: dotnet restore
3922
- name: Pre-build solution
4023
run: dotnet build LearnJsonEverything.sln -c Release --no-restore
24+
- name: Test
25+
run: dotnet test LearnJsonEverything.sln -c Release --no-restore
4126
- name: Publish
4227
run: dotnet publish LearnJsonEverything/LearnJsonEverything.csproj -c Release --no-restore -o bin
4328
- name: Add .nojekyll file

.github/workflows/test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Verify solutions
2+
on:
3+
push:
4+
branches:
5+
- main # Default release branch
6+
pull_request:
7+
workflow_dispatch:
8+
9+
jobs:
10+
test:
11+
name: Verify provided solutions
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: restore submodules
16+
run: git submodule update --init
17+
- name: Setup .NET Core
18+
uses: actions/setup-dotnet@v2
19+
with:
20+
dotnet-version: 8.0.x
21+
- name: Install dependencies
22+
run: dotnet restore
23+
- name: Test
24+
run: dotnet test LearnJsonEverything.sln -c Release --no-restore

0 commit comments

Comments
 (0)