File tree Expand file tree Collapse file tree 4 files changed +51
-3
lines changed
Expand file tree Collapse file tree 4 files changed +51
-3
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 : |
6578 run : dotnet workload restore src/Everywhere.Mac/Everywhere.Mac.csproj
6679
6780 - name : Restore
68- run : dotnet restore Everywhere.Mac.slnf -r ${{ matrix.runtime }}
81+ run : dotnet restore Everywhere.Mac.slnf -r ${{ matrix.runtime }} /p:RuntimeIdentifier=${{ matrix.runtime }}
6982
7083 - name : Publish
7184 env :
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 3535 Inputs =" $(WatchdogProject)"
3636 Outputs =" $(WatchdogExecutable)" >
3737
38- <Message Text =" Watchdog executable is out-of-date. Building..." Importance =" high" />
38+ <Message Text =" Watchdog executable is out-of-date. Building... $(RuntimeIdentifier):$(TargetFrameworkPrefix)" Importance =" high" />
39+
40+ <MSBuild Projects =" $(WatchdogProject)"
41+ Targets =" Restore"
42+ Properties =" RuntimeIdentifier=$(RuntimeIdentifier);TargetFramework=$(TargetFrameworkPrefix)" />
3943
4044 <MSBuild Projects =" $(WatchdogProject)"
4145 Targets =" Publish"
42- Properties =" PublishDir=$(WatchdogOutDir);" />
46+ Properties =" PublishDir=$(WatchdogOutDir);RuntimeIdentifier=$(RuntimeIdentifier);TargetFramework=$(TargetFrameworkPrefix);Version=$(Version) " />
4347 </Target >
4448</Project >
You can’t perform that action at this time.
0 commit comments