Skip to content

Commit fc2fac9

Browse files
author
Gurpreet Singh
committed
add option to publish all packages if needed
1 parent c822ead commit fc2fac9

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,23 @@ on:
1010
default: false
1111
type: boolean
1212

13+
publishWhichNuget:
14+
description: 'Which Nuget ?'
15+
required: true
16+
default: 'Only Changed'
17+
type: choice
18+
options:
19+
- Only Changed
20+
- All
21+
1322
jobs:
1423
build:
1524
runs-on: ubuntu-latest
1625
outputs:
1726
semver: ${{ steps.gitversion.outputs.semVer }}
1827
fullsemver: ${{ steps.gitversion.outputs.fullSemVer }}
1928
nugetversion: ${{ steps.gitversion.outputs.fullSemVer }}
20-
publishNuget: ${{ steps.changes.outputs.BddfyUpdated == 'true' || steps.changes.outputs.SamplesUpdated == 'true' }}
29+
publishNuget: ${{ steps.changes.outputs.BddfyUpdated == 'true' || steps.changes.outputs.SamplesUpdated == 'true' || github.event.inputs.publishWhichNuget == 'All' }}
2130
steps:
2231
- name: Checkout code
2332
uses: actions/checkout@v5
@@ -168,7 +177,7 @@ jobs:
168177
169178
- name: Create Samples package
170179
working-directory: src
171-
if: steps.changes.outputs.SamplesUpdated == 'true'
180+
if: steps.changes.outputs.SamplesUpdated == 'true' || github.event.inputs.publishWhichNuget == 'All'
172181
run: >-
173182
dotnet pack ./Samples/TestStack.BDDfy.Samples/*.csproj
174183
--configuration Release
@@ -178,7 +187,7 @@ jobs:
178187
179188
- name: Create Bddfy package
180189
working-directory: src
181-
if: steps.changes.outputs.BddfyUpdated == 'true'
190+
if: steps.changes.outputs.BddfyUpdated == 'true' || github.event.inputs.publishWhichNuget == 'All'
182191
run: >-
183192
dotnet pack ./TestStack.BDDfy/*.csproj
184193
--configuration Release

0 commit comments

Comments
 (0)