-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from Ian-Webster/19-add-extension-for-hotchoco…
…late 19 Add extension for HotChocolate
- Loading branch information
Showing
15 changed files
with
364 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Branch - build branch actions | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
- '!main' | ||
- '!trunk' | ||
|
||
jobs: | ||
|
||
build_DataAccess: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Install the .NET Core workload | ||
- name: Install .NET Core | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 8.0.x | ||
|
||
# Set up local NuGet repo | ||
- name: Setup GitHub NuGet | ||
run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/Ian-Webster/index.json" | ||
|
||
- name: Check for Changes in Repository Project | ||
run: | | ||
if [[ $(git diff --name-only ${{ github.event.before }} ${{ github.sha }} 'DataAccess.Repository/') ]]; then | ||
echo "Changes detected in DataAccess.Repository project. Restoring packages and running build..." | ||
dotnet restore 'DataAccess.Repository' | ||
dotnet build --configuration Release 'DataAccess.Repository' | ||
else | ||
echo "No changes in DataAccess.Repository project. Skipping build." | ||
fi | ||
build_HotChococlateExtension: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Install the .NET Core workload | ||
- name: Install .NET Core | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 8.0.x | ||
|
||
# Set up local NuGet repo | ||
- name: Setup GitHub NuGet | ||
run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/Ian-Webster/index.json" | ||
|
||
- name: Check for Changes in HotChocolate Project | ||
run: | | ||
if [[ $(git diff --name-only ${{ github.event.before }} ${{ github.sha }} 'Extensions/DataAccess.Repository.HotChocolate/') ]]; then | ||
echo "Changes detected in Extensions/DataAccess.Repository.HotChocolate project. Restoring packages and running build..." | ||
dotnet restore 'Extensions/DataAccess.Repository.HotChocolate' | ||
dotnet build --configuration Release 'Extensions/DataAccess.Repository.HotChocolate' | ||
else | ||
echo "No changes in Extensions/DataAccess.Repository.HotChocolate project. Skipping build." | ||
fi |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Trunk - build and package actions | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- trunk | ||
|
||
jobs: | ||
|
||
build_and_pack_DataAccess: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Install the .NET Core workload | ||
- name: Install .NET Core | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 8.0.x | ||
|
||
# Set up local NuGet repo | ||
- name: Setup GitHub NuGet | ||
run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/Ian-Webster/index.json" | ||
|
||
- name: Check for Changes in Repository Project | ||
run: | | ||
if [[ $(git diff --name-only ${{ github.event.before }} ${{ github.sha }} 'DataAccess.Repository/') ]]; then | ||
echo "Changes detected in DataAccess.Repository project. Restoring packages and running build..." | ||
dotnet restore 'DataAccess.Repository' | ||
dotnet build --configuration Release 'DataAccess.Repository' | ||
dotnet test 'DataAccess.Repository.Tests' | ||
dotnet nuget push "DataAccess.Repository/bin/Release/*.nupkg" --api-key ${{ secrets.GITHUB_TOKEN }} --source "github" --skip-duplicate | ||
else | ||
echo "No changes in DataAccess.Repository project. Skipping build and packing" | ||
fi | ||
build_and_pack_HotChococlateExtension: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Install the .NET Core workload | ||
- name: Install .NET Core | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 8.0.x | ||
|
||
# Set up local NuGet repo | ||
- name: Setup GitHub NuGet | ||
run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/Ian-Webster/index.json" | ||
|
||
- name: Check for Changes in HotChocolate Project | ||
run: | | ||
if [[ $(git diff --name-only ${{ github.event.before }} ${{ github.sha }} 'Extensions/DataAccess.Repository.HotChocolate/') ]]; then | ||
echo "Changes detected in Extensions/DataAccess.Repository.HotChocolate project. Restoring packages and running build..." | ||
dotnet restore 'Extensions/DataAccess.Repository.HotChocolate' | ||
dotnet build --configuration Release 'Extensions/DataAccess.Repository.HotChocolate' | ||
dotnet nuget push "DataAccess.Repository/bin/Release/*.nupkg" --api-key ${{ secrets.GITHUB_TOKEN }} --source "github" --skip-duplicate | ||
else | ||
echo "No changes in Extensions/DataAccess.Repository.HotChocolate project. Skipping build and packing" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Branch - test DataAccess.Repository action | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
- '!main' | ||
- '!trunk' | ||
|
||
jobs: | ||
|
||
test_DataAccess: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Install the .NET Core workload | ||
- name: Install .NET Core | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 8.0.x | ||
|
||
# Set up local NuGet repo | ||
- name: Setup GitHub NuGet | ||
run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/Ian-Webster/index.json" | ||
|
||
- name: Check for Changes in Repository Project | ||
run: | | ||
if [[ $(git diff --name-only ${{ github.event.before }} ${{ github.sha }} 'DataAccess.Repository/' 'DataAccess.Repository.Tests/') ]]; then | ||
echo "Changes detected. Restoring packages, running build and testing..." | ||
dotnet restore 'DataAccess.Repository' | ||
dotnet build --configuration Release 'DataAccess.Repository' | ||
dotnet test 'DataAccess.Repository.Tests' | ||
else | ||
echo "No changes. Skipping build and tests" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.