diff --git a/.github/workflows/licenses.yml b/.github/workflows/licenses.yml index 63527fc..a9065ba 100644 --- a/.github/workflows/licenses.yml +++ b/.github/workflows/licenses.yml @@ -3,14 +3,8 @@ name: License Check on: push: branches: [main] - paths: - - '**/*.csproj' - - '**/packages.lock.json' pull_request: branches: [main] - paths: - - '**/*.csproj' - - '**/packages.lock.json' workflow_dispatch: env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dcab203..31f5db2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -75,6 +75,22 @@ jobs: # Export public certificate for users Export-Certificate -Cert "Cert:\CurrentUser\My\$($cert.Thumbprint)" -FilePath CodexBarWin.cer + - name: Update Package.appxmanifest version + shell: pwsh + run: | + $version = "${{ github.ref_name }}" -replace '^v', '' + $versionParts = $version.Split('.') + while ($versionParts.Count -lt 4) { $versionParts += "0" } + $appxVersion = $versionParts -join '.' + Write-Host "Setting version to: $appxVersion" + + # Update Package.appxmanifest + $manifestPath = "Package.appxmanifest" + $content = Get-Content $manifestPath -Raw + $content = $content -replace 'Version="[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"', "Version=`"$appxVersion`"" + Set-Content $manifestPath $content -NoNewline + Write-Host "Updated Package.appxmanifest with version $appxVersion" + - name: Build MSIX package shell: pwsh run: |