Skip to content

Commit 8c3eb68

Browse files
SonOfSardaarGurpreet Singh
andauthored
Remove appveyor pipeline files (#293)
* Remove appveyor pipeline files as we are using github actions now add CODEOWNERS file Add steps to identify change path so that we can publish nuget based on changed project * test if path changes are detected as expected * change a file to trigger and test samples project change detection variable * add conditions to when a package should be created --------- Co-authored-by: Gurpreet Singh <[email protected]>
1 parent 56b2598 commit 8c3eb68

File tree

9 files changed

+71
-504
lines changed

9 files changed

+71
-504
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @SonOfSardaar @MehdiK

.github/workflows/build.yml

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
runPublish:
88
description: 'Publish Nuget ?'
99
required: true
10-
default: 'false'
10+
default: false
1111
type: boolean
1212

1313
jobs:
@@ -34,8 +34,14 @@ jobs:
3434
id: gitversion
3535

3636
- name: Format NuGet version
37-
run: |
38-
packageVersion="${{ steps.gitversion.outputs.majorMinorPatch }}.${{steps.gitversion.outputs.preReleaseNumber}}"
37+
run: |
38+
buildNumber="${{steps.gitversion.outputs.preReleaseNumber}}${{ steps.gitversion.outputs.buildMetaData }}"
39+
40+
if [[ "${GITHUB_REF}" != "refs/heads/${{ github.event.repository.default_branch }}" ]]; then
41+
buildNumber="${buildNumber}-beta"
42+
fi
43+
44+
packageVersion="${{ steps.gitversion.outputs.majorMinorPatch }}.${buildNumber}"
3945
echo "packageVersion=$packageVersion" >> $GITHUB_OUTPUT
4046
id: formatversion
4147

@@ -63,6 +69,8 @@ jobs:
6369
6470
- name: Run tests with coverage
6571
working-directory: src
72+
env:
73+
DiffEngine_Disabled: 'true'
6674
run: >-
6775
dotnet test
6876
--configuration Release
@@ -136,10 +144,41 @@ jobs:
136144
name: release-notes
137145
path: release-notes.md
138146

139-
- name: Create NuGet package
147+
- name: Check for changes in project paths
148+
id: changes
149+
run: |
150+
if git diff --quiet origin/main HEAD -- src/Samples/; then
151+
echo "SamplesUpdated=false" >> $GITHUB_OUTPUT
152+
else
153+
echo "SamplesUpdated=true" >> $GITHUB_OUTPUT
154+
fi
155+
156+
if git diff --quiet origin/main HEAD -- src/TestStack.BDDfy/; then
157+
echo "BddfyUpdated=false" >> $GITHUB_OUTPUT
158+
else
159+
echo "BddfyUpdated=true" >> $GITHUB_OUTPUT
160+
fi
161+
162+
- name: Print changed paths
163+
run: |
164+
echo "SamplesUpdated: ${{ steps.changes.outputs.SamplesUpdated }}"
165+
echo "BddfyUpdated: ${{ steps.changes.outputs.BddfyUpdated }}"
166+
167+
- name: Create Samples package
140168
working-directory: src
169+
if: steps.changes.outputs.SamplesUpdated == 'true'
141170
run: >-
142-
dotnet pack
171+
dotnet pack ./Samples/TestStack.BDDfy.Samples/*.csproj
172+
--configuration Release
173+
--no-build
174+
/p:PackageVersion=${{ steps.formatversion.outputs.packageVersion }}
175+
--output ../packages
176+
177+
- name: Create Bddfy package
178+
working-directory: src
179+
if: steps.changes.outputs.BddfyUpdated == 'true'
180+
run: >-
181+
dotnet pack ./TestStack.BDDfy/*.csproj
143182
--configuration Release
144183
--no-build
145184
/p:PackageVersion=${{ steps.formatversion.outputs.packageVersion }}
@@ -160,7 +199,7 @@ jobs:
160199
publish-nuget:
161200
runs-on: ubuntu-latest
162201
needs: build
163-
if: github.event.inputs.runPublish == 'true' && github.ref_name == github.event.repository.default_branch
202+
if: github.event.inputs.runPublish == 'true' || github.ref_name == github.event.repository.default_branch
164203
environment:
165204
name: Publish
166205
url: https://www.nuget.org/packages/TestStack.BDDfy/

appveyor.deploy.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

appveyor.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

build.cake

Lines changed: 0 additions & 83 deletions
This file was deleted.

build.ps1

Lines changed: 0 additions & 145 deletions
This file was deleted.

0 commit comments

Comments
 (0)