File tree Expand file tree Collapse file tree 6 files changed +49
-5
lines changed
Expand file tree Collapse file tree 6 files changed +49
-5
lines changed Original file line number Diff line number Diff line change 44 push :
55 tags :
66 - ' v*.*.*'
7+ workflow_dispatch :
78
89jobs :
910 build-linux :
2728 submodules : true
2829 lfs : true
2930
31+ - name : Verify Tag (Manual Trigger)
32+ if : github.event_name == 'workflow_dispatch'
33+ run : |
34+ TAG=$(git describe --exact-match --tags HEAD 2>/dev/null || echo "")
35+ if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+ ]]; then
36+ echo "Error: Current commit is not tagged with a valid version (vX.X.X)."
37+ echo "Current tag: $TAG"
38+ exit 1
39+ fi
40+ echo "Found valid tag: $TAG"
41+ echo "GITHUB_REF=refs/tags/$TAG" >> $GITHUB_ENV
42+
3043 - name : Get version from tag
3144 id : get_version
3245 run : |
Original file line number Diff line number Diff line change 44 push :
55 tags :
66 - ' v*.*.*'
7+ workflow_dispatch :
78
89jobs :
910 build-mac :
2425 submodules : true
2526 lfs : true
2627
28+ - name : Verify Tag (Manual Trigger)
29+ if : github.event_name == 'workflow_dispatch'
30+ run : |
31+ TAG=$(git describe --exact-match --tags HEAD 2>/dev/null || echo "")
32+ if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+ ]]; then
33+ echo "Error: Current commit is not tagged with a valid version (vX.X.X)."
34+ echo "Current tag: $TAG"
35+ exit 1
36+ fi
37+ echo "Found valid tag: $TAG"
38+ echo "GITHUB_REF=refs/tags/$TAG" >> $GITHUB_ENV
39+
2740 - name : Get version from tag
2841 id : get_version
2942 run : |
7588 dotnet publish src/Everywhere.Mac/Everywhere.Mac.csproj \
7689 -c Release \
7790 -r ${{ matrix.runtime }} \
91+ /p:RuntimeIdentifier=${{ matrix.runtime }} \
7892 /p:CodesignKey="$CODE_SIGN_KEY" \
7993 /p:PackageSigningKey="$PACKAGE_SIGNING_KEY" \
8094 /p:Version=${{ env.VERSION }} \
Original file line number Diff line number Diff line change 44 push :
55 tags :
66 - ' v*.*.*'
7+ workflow_dispatch :
78
89jobs :
910 build-and-release :
1920 fetch-depth : 0
2021 submodules : true
2122 lfs : true
23+
24+ - name : Verify Tag (Manual Trigger)
25+ if : github.event_name == 'workflow_dispatch'
26+ shell : pwsh
27+ run : |
28+ $tag = git describe --exact-match --tags HEAD 2>$null
29+ if ($LASTEXITCODE -ne 0) {
30+ Write-Error "Error: Current commit is not tagged."
31+ exit 1
32+ }
33+ if ($tag -notmatch '^v\d+\.\d+\.\d+') {
34+ Write-Error "Error: Current commit tag '$tag' does not match vX.X.X format."
35+ exit 1
36+ }
37+ Write-Host "Found valid tag: $tag"
38+ echo "GITHUB_REF=refs/tags/$tag" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
2239
2340 - name : Get version from tag
2441 id : get_version
Original file line number Diff line number Diff line change 5050 <DefineConstants >$(DefineConstants);BROWSER;WASM;IsBrowser;IsWasm</DefineConstants >
5151 </PropertyGroup >
5252
53- <PropertyGroup Condition =" $([System.String]::Copy($(RuntimeIdentifier)).Contains('x64')) OR $([System.String]::Copy($(RuntimeIdentifier)).Contains('win-x64')) " >
53+ <PropertyGroup Condition =" $([System.String]::Copy($(RuntimeIdentifier)).Contains('x64'))" >
5454 <IsX64 >true</IsX64 >
5555 <DefineConstants >$(DefineConstants);X64;IsX64</DefineConstants >
5656 </PropertyGroup >
5757
58- <PropertyGroup Condition =" $([System.String]::Copy($(RuntimeIdentifier)).Contains('x86')) OR $([System.String]::Copy($(RuntimeIdentifier)).Contains('win-x86')) " >
58+ <PropertyGroup Condition =" $([System.String]::Copy($(RuntimeIdentifier)).Contains('x86'))" >
5959 <IsX86 >true</IsX86 >
6060 <DefineConstants >$(DefineConstants);X86;IsX86</DefineConstants >
6161 </PropertyGroup >
Original file line number Diff line number Diff line change 3434 BeforeTargets =" BeforeResolveReferences"
3535 Inputs =" $(WatchdogProject)"
3636 Outputs =" $(WatchdogExecutable)" >
37-
38- <Message Text =" Watchdog executable is out-of-date. Building..." Importance =" high" />
37+ <Message Text =" Watchdog executable is out-of-date. Building... $(RuntimeIdentifier):$(TargetFrameworkPrefix)" Importance =" high" />
3938
4039 <MSBuild Projects =" $(WatchdogProject)"
4140 Targets =" Publish"
42- Properties =" PublishDir=$(WatchdogOutDir);" />
41+ Properties =" PublishDir=$(WatchdogOutDir);RuntimeIdentifier=$(RuntimeIdentifier);TargetFramework=$(TargetFrameworkPrefix);Version=$(Version) " />
4342 </Target >
4443</Project >
Original file line number Diff line number Diff line change 55 <PublishAot >true</PublishAot >
66 <SelfContained >true</SelfContained >
77 <OptimizationPreference >Size</OptimizationPreference >
8+ <RuntimeIdentifiers >win-x64;osx-x64;osx-arm64</RuntimeIdentifiers >
89 </PropertyGroup >
910
1011 <ItemGroup >
You can’t perform that action at this time.
0 commit comments