Skip to content

Commit 7da7746

Browse files
MichelMichelsKeboo
andauthored
Feature/project structure (#3533)
* Progress - Restructure of project directories and files * Progress - Images fixed in README.md * Removed .DotSettings file in favor of .editorconfig * Removed UWP project from active repository, it hasn't received any significant updates in 9 years * mdresgen renamed to MaterialDesignToolkit.ResourceGeneration * Moved .props files * Moved .props files back * Project structure - 'build' directory excluded from .gitignore * Fixing up issue with building NuGets --------- Co-authored-by: Kevin Bost <[email protected]>
1 parent 93784df commit 7da7746

File tree

1,168 files changed

+894
-34797
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,168 files changed

+894
-34797
lines changed

.github/workflows/build_artifacts.yml

Lines changed: 63 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,74 @@
11
name: Build Artifacts
22

33
on:
4-
workflow_call:
5-
inputs:
6-
build-configuration:
7-
default: 'Release'
8-
required: false
9-
type: string
10-
mdix-version:
11-
required: true
12-
type: string
13-
mdix-colors-version:
14-
required: true
15-
type: string
16-
mdix-mahapps-version:
17-
required: true
18-
type: string
19-
4+
workflow_call:
5+
inputs:
6+
build-configuration:
7+
default: "Release"
8+
required: false
9+
type: string
10+
mdix-version:
11+
required: true
12+
type: string
13+
mdix-colors-version:
14+
required: true
15+
type: string
16+
mdix-mahapps-version:
17+
required: true
18+
type: string
2019

2120
jobs:
22-
build:
23-
name: Build and Test
24-
runs-on: windows-latest
21+
build:
22+
name: Build and Test
23+
runs-on: windows-latest
24+
25+
env:
26+
solution: MaterialDesignToolkit.Full.sln
2527

26-
env:
27-
solution: MaterialDesignToolkit.Full.sln
28+
steps:
29+
- uses: actions/checkout@v4
2830

29-
steps:
30-
- uses: actions/checkout@v4
31+
- name: Setup .NET
32+
uses: actions/setup-dotnet@v4
33+
with:
34+
dotnet-version: |
35+
6.x
36+
7.x
37+
8.x
3138
32-
- name: Setup .NET
33-
uses: actions/setup-dotnet@v4
34-
with:
35-
dotnet-version: |
36-
6.x
37-
7.x
38-
8.x
39-
40-
- name: Restore dependencies
41-
run: dotnet restore ${{ env.solution }}
42-
43-
- name: Build
44-
run: dotnet build ${{ env.solution }} --configuration ${{ inputs.build-configuration }} --no-restore -p:Platform="Any CPU" -p:TreatWarningsAsErrors=True
45-
env:
46-
MDIXVersion: ${{ inputs.mdix-version }}
47-
MDIXColorsVersion: ${{ inputs.mdix-colors-version }}
48-
MDIXMahAppsVersion: ${{ inputs.mdix-mahapps-version }}
49-
50-
- name: Test
51-
timeout-minutes: 20
52-
run: dotnet test ${{ env.solution }} --configuration ${{ inputs.build-configuration }} --no-build --blame-crash --logger GitHubActions
53-
54-
- name: Upload Screenshots
55-
if: ${{ always() }}
56-
uses: actions/upload-artifact@v4
57-
with:
58-
name: Screenshots-${{ github.run_number }}
59-
path: ${{ github.workspace }}\MaterialDesignThemes.UITests\bin\${{ inputs.build-configuration }}\net8.0-windows7\Screenshots
60-
if-no-files-found: ignore
39+
- name: Restore dependencies
40+
run: dotnet restore ${{ env.solution }}
41+
42+
- name: Build
43+
run: dotnet build ${{ env.solution }} --configuration ${{ inputs.build-configuration }} --no-restore -p:Platform="Any CPU" -p:TreatWarningsAsErrors=True
44+
env:
45+
MDIXVersion: ${{ inputs.mdix-version }}
46+
MDIXColorsVersion: ${{ inputs.mdix-colors-version }}
47+
MDIXMahAppsVersion: ${{ inputs.mdix-mahapps-version }}
48+
49+
- name: Test
50+
timeout-minutes: 20
51+
run: dotnet test ${{ env.solution }} --configuration ${{ inputs.build-configuration }} --no-build --blame-crash --logger GitHubActions
52+
53+
- name: Upload Screenshots
54+
if: ${{ always() }}
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: Screenshots-${{ github.run_number }}
58+
path: ${{ github.workspace }}tests\MaterialDesignThemes.UITests\bin\${{ inputs.build-configuration }}\net8.0-windows7\Screenshots
59+
if-no-files-found: ignore
6160

62-
- name: Build NuGets
63-
run: .\Scripts\BuildNugets.ps1 -MDIXVersion ${{ inputs.mdix-version }} -MDIXColorsVersion ${{ inputs.mdix-colors-version }} -MDIXMahAppsVersion ${{ inputs.mdix-mahapps-version }}
61+
- name: Build NuGets
62+
run: .\build\BuildNugets.ps1 -MDIXVersion ${{ inputs.mdix-version }} -MDIXColorsVersion ${{ inputs.mdix-colors-version }} -MDIXMahAppsVersion ${{ inputs.mdix-mahapps-version }}
6463

65-
- name: Upload NuGets
66-
uses: actions/upload-artifact@v4
67-
with:
68-
name: NuGets
69-
path: "*.nupkg"
64+
- name: Upload NuGets
65+
uses: actions/upload-artifact@v4
66+
with:
67+
name: NuGets
68+
path: "*.nupkg"
7069

71-
- name: Upload Demo App
72-
uses: actions/upload-artifact@v4
73-
with:
74-
name: DemoApp
75-
path: "MainDemo.Wpf/bin/${{ env.buildConfiguration }}"
70+
- name: Upload Demo App
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: DemoApp
74+
path: "src/MainDemo.Wpf/bin/${{ env.buildConfiguration }}"

.github/workflows/control_styles.yml

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
11
name: Wiki - Update Control Styles
22

33
on:
4-
# push:
5-
# branches: [ master ]
6-
workflow_dispatch:
4+
# push:
5+
# branches: [ master ]
6+
workflow_dispatch:
77

88
jobs:
9-
build:
9+
build:
10+
runs-on: ubuntu-latest
1011

11-
runs-on: ubuntu-latest
12-
13-
steps:
14-
- uses: actions/checkout@v4
15-
- name: Generate Control Styles Markdown
16-
run: Scripts/GenerateThemesWikiMarkdown.ps1
17-
shell: pwsh
18-
- name: Upload Control Styles to Wiki
19-
uses: docker://decathlon/wiki-page-creator-action:latest
20-
env:
21-
GH_PAT: ${{ secrets.SA_TOKEN }}
22-
ACTION_MAIL: [email protected]
23-
ACTION_NAME: Material Design Service Account
24-
OWNER: MaterialDesignInXAML
25-
REPO_NAME: MaterialDesignInXamlToolkit
26-
MD_FOLDER: Scripts
27-
WIKI_PUSH_MESSAGE: Automatic update of ControlStyleList.md from GitHub Action
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Generate Control Styles Markdown
15+
run: build/GenerateThemesWikiMarkdown.ps1
16+
shell: pwsh
17+
- name: Upload Control Styles to Wiki
18+
uses: docker://decathlon/wiki-page-creator-action:latest
19+
env:
20+
GH_PAT: ${{ secrets.SA_TOKEN }}
21+
ACTION_MAIL: [email protected]
22+
ACTION_NAME: Material Design Service Account
23+
OWNER: MaterialDesignInXAML
24+
REPO_NAME: MaterialDesignInXamlToolkit
25+
MD_FOLDER: build
26+
WIKI_PUSH_MESSAGE: Automatic update of ControlStyleList.md from GitHub Action

.github/workflows/icon_update.yml

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
11
name: Icon Update
22

33
on:
4-
workflow_dispatch:
5-
schedule:
6-
- cron: '0 3 * * *'
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 3 * * *"
77

88
env:
9-
GH_TOKEN: ${{ secrets.SA_PAT }}
9+
GH_TOKEN: ${{ secrets.SA_PAT }}
1010

1111
defaults:
12-
run:
13-
shell: pwsh
12+
run:
13+
shell: pwsh
1414

1515
jobs:
16-
build:
17-
#This check prevents this from running on forks
18-
if: ${{ github.repository == 'MaterialDesignInXAML/MaterialDesignInXamlToolkit' }}
19-
20-
runs-on: windows-latest
21-
22-
steps:
23-
- uses: actions/checkout@v4
24-
25-
- name: Setup .NET
26-
uses: actions/setup-dotnet@v4
27-
with:
28-
dotnet-version: 7.x
29-
30-
- name: Run Icon Generation
31-
run: dotnet run -c Release -- icons
32-
working-directory: ./mdresgen
33-
34-
- name: Check for changes
35-
id: check_for_changes
36-
run: |
37-
$hasChanges = $((git status --porcelain).Length -gt 0).ToString().ToLower()
38-
"has_changes=$hasChanges" >> $env:GITHUB_OUTPUT
39-
40-
- name: Open Pull Request
41-
if: ${{ steps.check_for_changes.outputs.has_changes == 'true' }}
42-
run: |
43-
git config --local user.email "github-actions[bot]@users.noreply.github.com"
44-
git config --local user.name "github-actions[bot]"
45-
git checkout -b "automated/icon_update"
46-
git commit -m "[bot] Pack Icon update" --all
47-
git push -f --set-upstream origin automated/icon_update
48-
gh pr create --fill
49-
gh pr merge automated/icon_update --delete-branch --auto --squash
16+
build:
17+
#This check prevents this from running on forks
18+
if: ${{ github.repository == 'MaterialDesignInXAML/MaterialDesignInXamlToolkit' }}
19+
20+
runs-on: windows-latest
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Setup .NET
26+
uses: actions/setup-dotnet@v4
27+
with:
28+
dotnet-version: 7.x
29+
30+
- name: Run Icon Generation
31+
run: dotnet run -c Release -- icons
32+
working-directory: ./src/MaterialDesignToolkit.ResourceGeneration
33+
34+
- name: Check for changes
35+
id: check_for_changes
36+
run: |
37+
$hasChanges = $((git status --porcelain).Length -gt 0).ToString().ToLower()
38+
"has_changes=$hasChanges" >> $env:GITHUB_OUTPUT
39+
40+
- name: Open Pull Request
41+
if: ${{ steps.check_for_changes.outputs.has_changes == 'true' }}
42+
run: |
43+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
44+
git config --local user.name "github-actions[bot]"
45+
git checkout -b "automated/icon_update"
46+
git commit -m "[bot] Pack Icon update" --all
47+
git push -f --set-upstream origin automated/icon_update
48+
gh pr create --fill
49+
gh pr merge automated/icon_update --delete-branch --auto --squash

0 commit comments

Comments
 (0)