Skip to content

Commit

Permalink
Merge pull request #933 from Caliburn-Micro/932-fix-github-action-build
Browse files Browse the repository at this point in the history
Update CI/CD configs and add Dependabot support
  • Loading branch information
vb2ae authored Nov 21, 2024
2 parents 17bf808 + 3572f88 commit 575cb97
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "nuget" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
global-json-file: src/global.json

- name: Setup Java SDK
uses: actions/setup-java@v4
Expand Down
19 changes: 7 additions & 12 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ env:
caliburn_features: "samples\\features\\features.sln"
package_feed: "https://nuget.pkg.github.com/caliburn-micro/index.json"
nuget_folder: "\\packages"
nuget_upload: 'packages\*.nupkg'
build_configuration: "Release"

jobs:
Expand All @@ -29,7 +30,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
global-json-file: src/global.json
- name: Setup Java SDK
uses: actions/setup-java@v4
with:
Expand All @@ -50,22 +51,16 @@ jobs:
run: dotnet workload install maui maui-android maui-ios maui-tizen maui-maccatalyst maui-windows android --source https://api.nuget.org/v3/index.json
- name: list workloads
run: dotnet workload list

- name: Ensure GitHub NuGet Source
run: dotnet nuget add source ${{ env.package_feed }}
-n github
-u ${{ secrets.NUGET_USER }}
-p ${{ secrets.CONSUME_CALIBURN_FEED }}
--store-password-in-clear-text
if: github.event_name != 'pull_request'

- name: Restore nuget packages
run: msbuild ${{env.caliburn_sln}} -t:restore

- name: Build app for release
run: msbuild ${{env.caliburn_sln}} /t:Build /p:Configuration=${{env.build_configuration}}


- name: Run Unit Tests
run: dotnet test ${{env.caliburn_sln}} --configuration ${{env.build_configuration}} -p:CollectCoverage=true -p:CoverletOutputFormat=json --no-build --verbosity normal

- name: Restore nuget packages for tutorial
run: msbuild ${{env.caliburn_tutorial}} -t:restore

Expand All @@ -82,5 +77,5 @@ jobs:
run: msbuild ${{env.caliburn_sln}} /t:package /p:Configuration=${{env.build_configuration}}

- name: publish Nuget Packages to GitHub
run: dotnet nuget push ${{env.nuget_folder}}\**\*.nupkg --source ${{env.package_feed}} --api-key ${{secrets.PUBLISH_NUGET_PACKAGE}} --skip-duplicate
if: github.event_name != 'pull_request'
run: dotnet nuget push ${{env.nuget_upload}} --source ${{env.package_feed}} --api-key ${{secrets.PUBLISH_NUGET_PACKAGE}} --skip-duplicate
if: github.event_name != 'pull_request'

0 comments on commit 575cb97

Please sign in to comment.