Skip to content

Commit cd0c241

Browse files
committed
Working on appx building & signing
1 parent 953f1e6 commit cd0c241

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,11 @@ jobs:
2929
- name: Build x64
3030
run: |
3131
# Set the version number for the build based on the tag or fallback to the branch name
32-
if ("${{ inputs.tag }}" -match '^v(\d+\.\d+\.\d+)$') {
33-
$version = $Matches[1]
34-
} else {
35-
$version = "0.0.1" # fallback version if no tag is provided
36-
}
32+
$version = if ("${{ inputs.tag }}".Length -eq 0) { "${{ inputs.tag }}.0" } else { "${{ github.ref_name }}.0" }
33+
3734
Write-Host "Setting version to $version"
3835
39-
dotnet build --configuration Release -p Platform=x64 -p Version="$version.0" -p GenerateAppxPackageOnBuild=true
36+
dotnet build --configuration Release -p Platform=x64 -p Version=$version -p GenerateAppxPackageOnBuild=true
4037
4138
- name: Move misx Packages
4239
run: |
@@ -83,9 +80,9 @@ jobs:
8380
name: Create Release
8481
with:
8582
artifacts: "${{ github.workspace }}/tmp/*.msix" # Path to the signed msix files to upload as artifacts for the release. Use glob pattern to match all files in the tmp folder.
86-
name: Release $version
83+
name: if ("${{ inputs.tag }}".Length -eq 0) { "Release ${{ inputs.tag }}" } else { "Release ${{ github.ref_name }}" }
8784
allowUpdates: true
88-
tag: $version
85+
tag: if ("${{ inputs.tag }}".Length -eq 0) { ${{ inputs.tag }} } else { ${{ github.ref_name }} }
8986

9087
# publish:
9188
# runs-on: windows-latest

0 commit comments

Comments
 (0)