Skip to content

Commit 9183f87

Browse files
committed
Do not reuse the CI workflow for releases so we can build without tests.
1 parent 4fba3e7 commit 9183f87

File tree

2 files changed

+32
-10
lines changed

2 files changed

+32
-10
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,31 @@ on:
55
branches: ["main"]
66
pull_request:
77
branches: ["main"]
8-
workflow_call:
98

109
jobs:
1110
build:
12-
13-
runs-on: ${{ matrix.os }}
14-
1511
strategy:
1612
matrix:
1713
os: [ubuntu-latest, windows-latest, macos-latest]
1814
configuration: [Debug, Release]
1915
fail-fast: false
2016

17+
runs-on: ${{ matrix.os }}
18+
2119
steps:
22-
- uses: actions/checkout@v4
20+
- name: Clone the repo
21+
uses: actions/checkout@v4
2322
with:
2423
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
2524

26-
- name: Setup .NET
25+
- name: Set up .NET
2726
uses: actions/setup-dotnet@v4
2827
with:
2928
dotnet-version: |
3029
9.0.x
3130
8.0.x
3231
33-
# Netfx testing on non-Windows requires mono
32+
# NetFX testing on non-Windows requires mono
3433
- name: Setup Mono
3534
if: runner.os == 'Linux'
3635
run: sudo apt-get install -y mono-devel

.github/workflows/release.yml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,35 @@ on:
3131
types: [published]
3232

3333
jobs:
34-
run-ci:
35-
uses: ./.github/workflows/ci.yml
34+
build-all-configs:
35+
strategy:
36+
matrix:
37+
os: [ubuntu-latest, windows-latest, macos-latest]
38+
configuration: [Debug, Release]
39+
fail-fast: false
40+
41+
runs-on: ${{ matrix.os }}
42+
43+
steps:
44+
- name: Clone the repo
45+
uses: actions/checkout@v4
46+
with:
47+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
48+
49+
- name: Set up .NET
50+
uses: actions/setup-dotnet@v4
51+
with:
52+
dotnet-version: 9.0.x
53+
54+
- name: Build
55+
run: dotnet build --configuration ${{ matrix.configuration }}
56+
57+
- name: Pack
58+
run: dotnet pack --configuration ${{ matrix.configuration }}
3659

3760
build-package:
3861
runs-on: windows-latest
39-
needs: run-ci
62+
needs: build-all-configs
4063

4164
env:
4265
version_suffix_args: ${{ github.event_name != 'release' && format('--version-suffix "{0}"', inputs.version_suffix_override || format('ci.{0}', github.run_number)) || '' }}

0 commit comments

Comments
 (0)