Skip to content

Commit a660064

Browse files
committed
Use .Net 6. Improve code structure.
1 parent c006e9f commit a660064

22 files changed

+144
-431
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ insert_final_newline = true
77
charset = utf-8
88
indent_style = space
99
indent_size = 4
10+
11+
[*.{xml,wxs,cspro,yaml,props}]
12+
indent_size = 2

.github/workflows/build.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ Function CreateZipArchive($dir) {
2222
Function GetVersion() {
2323
$gitCommand = Get-Command -Name git
2424

25-
$nearestTag = & "$gitCommand" describe --exact-match --tags HEAD
25+
$nearestTag = & $gitCommand describe --exact-match --tags HEAD
2626
if(-Not $?) {
27-
Info "The commit is not tagged. Use 'v0.0-dev' as a version instead"
27+
Info "The commit is not tagged. Use 'v0.0-dev' as a tag instead"
2828
$nearestTag = "v0.0-dev"
2929
}
3030

31-
$commitHash = & "$gitCommand" rev-parse --short HEAD
31+
$commitHash = & $gitCommand rev-parse --short HEAD
3232
CheckReturnCodeOfPreviousCommand "Failed to get git commit hash"
3333

3434
return "$($nearestTag.Substring(1))-$commitHash"
@@ -45,7 +45,7 @@ Function Publish($slnFile, $version, $outDir) {
4545
--configuration Release `
4646
--output $outDir `
4747
/property:PublishSingleFile=true `
48-
/property:IncludeNativeLibrariesForSelfExtract=true `
48+
/property:IncludeAllContentForSelfExtract=true `
4949
/property:PublishTrimmed=true `
5050
/property:TrimMode=link `
5151
/property:DebugType=None `
@@ -65,4 +65,4 @@ $projectName = "BluetoothDevicePairing"
6565
Publish `
6666
-slnFile $root/$projectName.sln `
6767
-version (GetVersion) `
68-
-outDir $root/Build/Publish/$projectName
68+
-outDir $root/build/Publish/$projectName

.github/workflows/continuous-integration-workflow.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ on: push
22

33
jobs:
44
build:
5-
runs-on: windows-latest
5+
runs-on: windows-2022
66
steps:
7-
- uses: actions/checkout@v2.3.4
7+
- uses: actions/checkout@v2
88
- run: .github/workflows/build.ps1
99
- uses: softprops/action-gh-release@v1
1010
if: startsWith(github.ref, 'refs/tags/')
@@ -14,3 +14,7 @@ jobs:
1414
draft: true
1515
files: Build/Publish/*.zip
1616
fail_on_unmatched_files: true
17+
- uses: actions/upload-artifact@v2
18+
with:
19+
name: Build artifacts
20+
path: Build/Publish/*.zip

0 commit comments

Comments
 (0)