-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e47144
commit f2f0445
Showing
16 changed files
with
161 additions
and
175 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,90 @@ | ||
name: Build | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
paths-ignore: | ||
- '.scripts/**' | ||
- .gitignore | ||
- CODE_OF_CONDUCT.md | ||
- LICENSE | ||
- README.md | ||
|
||
workflow_call: | ||
inputs: | ||
build-artifacts: | ||
type: boolean | ||
required: true | ||
default: false | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
name: Checkout code | ||
|
||
- name: Cache NuGet packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.nuget/packages | ||
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-nuget- | ||
#if (!UseApiOnly) | ||
- name: Install Node & cache npm packages | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
cache: 'npm' | ||
cache-dependency-path: src/Web/ClientApp/package-lock.json | ||
#endif | ||
|
||
- name: Install .NET | ||
uses: actions/setup-dotnet@v3 | ||
|
||
- name: Restore solution | ||
run: dotnet restore | ||
|
||
- name: Build solution | ||
run: dotnet build --no-restore --configuration Release | ||
|
||
- name: Test solution | ||
run: dotnet test --no-build --configuration Release --filter "FullyQualifiedName!~AcceptanceTests" | ||
|
||
- name: Publish website | ||
if: ${{ inputs.build-artifacts == true }} | ||
run: | | ||
dotnet publish --configuration Release --runtime win-x86 --self-contained --output ./publish | ||
cd publish | ||
zip -r ./publish.zip . | ||
working-directory: ./src/Web/ | ||
|
||
- name: Upload website artifact (website) | ||
if: ${{ inputs.build-artifacts == true }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: website | ||
path: ./src/Web/publish/publish.zip | ||
if-no-files-found: error | ||
|
||
- name: Create EF Core migrations bundle | ||
if: ${{ inputs.build-artifacts == true }} | ||
run: | | ||
dotnet new tool-manifest | ||
dotnet tool install dotnet-ef --prerelease | ||
dotnet ef migrations bundle --configuration Release -p ./src/Infrastructure/ -s ./src/Web/ -o efbundle.exe | ||
zip -r ./efbundle.zip efbundle.exe | ||
env: | ||
SkipNSwag: True | ||
|
||
- name: Upload EF Core migrations bundle artifact (efbundle) | ||
if: ${{ inputs.build-artifacts == true }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: efbundle | ||
path: ./efbundle.zip | ||
if-no-files-found: error | ||
name: Build | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
paths-ignore: | ||
- '.scripts/**' | ||
- .gitignore | ||
- CODE_OF_CONDUCT.md | ||
- LICENSE | ||
- README.md | ||
|
||
workflow_call: | ||
inputs: | ||
build-artifacts: | ||
type: boolean | ||
required: true | ||
default: false | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
name: Checkout code | ||
|
||
- name: Cache NuGet packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.nuget/packages | ||
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-nuget- | ||
#if (!UseApiOnly) | ||
- name: Install Node & cache npm packages | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
cache: 'npm' | ||
cache-dependency-path: src/Web/ClientApp/package-lock.json | ||
#endif | ||
|
||
- name: Install .NET | ||
uses: actions/setup-dotnet@v3 | ||
|
||
- name: Restore solution | ||
run: dotnet restore | ||
|
||
- name: Build solution | ||
run: dotnet build --no-restore --configuration Release | ||
|
||
- name: Test solution | ||
run: dotnet test --no-build --configuration Release --filter "FullyQualifiedName!~AcceptanceTests" | ||
|
||
- name: Publish website | ||
if: ${{ inputs.build-artifacts == true }} | ||
run: | | ||
dotnet publish --configuration Release --runtime win-x86 --self-contained --output ./publish | ||
cd publish | ||
zip -r ./publish.zip . | ||
working-directory: ./src/Web/ | ||
|
||
- name: Upload website artifact (website) | ||
if: ${{ inputs.build-artifacts == true }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: website | ||
path: ./src/Web/publish/publish.zip | ||
if-no-files-found: error | ||
|
||
- name: Create EF Core migrations bundle | ||
if: ${{ inputs.build-artifacts == true }} | ||
run: | | ||
dotnet new tool-manifest | ||
dotnet tool install dotnet-ef | ||
dotnet ef migrations bundle --configuration Release -p ./src/Infrastructure/ -s ./src/Web/ -o efbundle.exe | ||
zip -r ./efbundle.zip efbundle.exe | ||
env: | ||
SkipNSwag: True | ||
|
||
- name: Upload EF Core migrations bundle artifact (efbundle) | ||
if: ${{ inputs.build-artifacts == true }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: efbundle | ||
path: ./efbundle.zip | ||
if-no-files-found: error |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
{ | ||
"sdk": { | ||
"version": "8.0.100-preview.7.23376.3", | ||
"rollForward": "latestMajor", | ||
"allowPrerelease": true | ||
"version": "8.0.100", | ||
"rollForward": "latestMinor" | ||
} | ||
} |
Oops, something went wrong.