Skip to content

Commit

Permalink
Use .Net 6. Improve code structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
PolarGoose committed Dec 29, 2021
1 parent c006e9f commit a660064
Show file tree
Hide file tree
Showing 22 changed files with 144 additions and 431 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 4

[*.{xml,wxs,cspro,yaml,props}]
indent_size = 2
10 changes: 5 additions & 5 deletions .github/workflows/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ Function CreateZipArchive($dir) {
Function GetVersion() {
$gitCommand = Get-Command -Name git

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

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

return "$($nearestTag.Substring(1))-$commitHash"
Expand All @@ -45,7 +45,7 @@ Function Publish($slnFile, $version, $outDir) {
--configuration Release `
--output $outDir `
/property:PublishSingleFile=true `
/property:IncludeNativeLibrariesForSelfExtract=true `
/property:IncludeAllContentForSelfExtract=true `
/property:PublishTrimmed=true `
/property:TrimMode=link `
/property:DebugType=None `
Expand All @@ -65,4 +65,4 @@ $projectName = "BluetoothDevicePairing"
Publish `
-slnFile $root/$projectName.sln `
-version (GetVersion) `
-outDir $root/Build/Publish/$projectName
-outDir $root/build/Publish/$projectName
8 changes: 6 additions & 2 deletions .github/workflows/continuous-integration-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ on: push

jobs:
build:
runs-on: windows-latest
runs-on: windows-2022
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v2
- run: .github/workflows/build.ps1
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
Expand All @@ -14,3 +14,7 @@ jobs:
draft: true
files: Build/Publish/*.zip
fail_on_unmatched_files: true
- uses: actions/upload-artifact@v2
with:
name: Build artifacts
path: Build/Publish/*.zip
Loading

0 comments on commit a660064

Please sign in to comment.