ci: auto-tag a greater Version on main - #2
Merged
Conversation
Push to main reads Version from the app csproj (Directory.Build.props
fallback) and compares it to existing v* tags with the same SemVer rules
as the in-app updater. If the landed version is greater and v{version}
does not exist, push that tag and invoke the existing signed Release
workflow. Equal or lower versions are left untagged; tags are never
force-pushed.
Co-authored-by: Paul Smith <piranout@users.noreply.github.com>
Signing steps in release.yml were unchanged and still match Markdown Midget (same AZURE_* secrets, account, profile, endpoint). Keep the Aperture fail-fast secret check. Tag version only creates the tag and calls Release with secrets: inherit. Co-authored-by: Paul Smith <piranout@users.noreply.github.com>
dotnet run forwarded --nologo to the helper, which treats unknown args as fatal. Drop the flag from CI and the tag job. Co-authored-by: Paul Smith <piranout@users.noreply.github.com>
dotnet run emits one line per WriteLine; assigning that to $out makes an array, and -notmatch then filters lines (truthy leftover) instead of searching the whole log. Out-String first. Co-authored-by: Paul Smith <piranout@users.noreply.github.com>
piranout
marked this pull request as ready for review
August 21, 2026 20:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #1 merged
0.8.1-beta1tomainand CI is green, but the latest GitHub release/tag is stillv0.8.0-beta1.release.ymlonly runs onv*tags (andworkflow_dispatch). The merge bumped Version and never pushed a tag, so Release never ran.What
On push to
mainonly (not PRs):.github/workflows/tag-version.yml) reads<Version>fromsrc/Aperture.App/Aperture.App.csproj(falls back toDirectory.Build.propsif the csproj has none).v*tags using the same SemVer rules as the in-app updater (UpdateVersion— prerelease suffixes matter). Shared decision logic isReleaseTag.cs; the tag job runs a thinscripts/DecideReleaseTaghelper that compiles those same sources.v{version}does not exist, it creates and pushes that tag (never force-pushes). Equal or lower versions are left untagged.GITHUB_TOKENtag push does not start other workflows, so the tag job then calls the existingrelease.yml(workflow_call,secrets: inherit). Signing/publish is unchanged and not duplicated.docs/GITHUB-SETUP.md“Cutting a release” is now: bump Version + CHANGELOG on main; the tag is automatic. Manualgit tag/workflow_dispatchstay as fallbacks.Signing vs Markdown Midget (verified, no secret values)
Diffed Aperture
.github/workflows/release.ymlsigning steps against published Markdown Midgetrelease.yml. Identity still matches. Aperture did not drift. Signing YAML on this branch is identical tomain(this PR only addedworkflow_callso the tag job can invoke it).AZURE_CLIENT_ID,AZURE_TENANT_ID,AZURE_CLIENT_SECRETfunc-az-artifact-signingfuncular-labs-public-trusthttps://cus.codesigning.azure.net/azuretrustedsigntool sign+ Windows SDKsigntool.exeAperture Image ViewerMarkdown Midget(the only intended product difference)No new cert, key, or SP. The auto-tag job does not sign and does not bypass Release.
Org secret repository-allowlists cannot be read from this repo. The YAML is correct. The last published asset
Aperture-v0.8.0-beta1-win-x64.exewas uploaded bygithub-actions[bot]; that Release run’s Check signing secrets are present, Sign the exe (Azure Trusted Signing), and Verify Authenticode signature steps all succeeded — so the allowlist was working then.First ship of 0.8.1-beta1
Do not tag from this PR. After this merges, Tag version runs on that
mainpush, sees0.8.1-beta1>v0.8.0-beta1, and should createv0.8.1-beta1and invoke the same signed Release job.How to test
dotnet testincludes the newReleaseTagTests; the extra “Release-tag helper” step must printshould_tag=true/tag=v0.8.1-beta1against a fakev0.8.0-beta1list.v0.8.1-beta1and start Release (signed exe + prerelease).Permissions
contents: writeonly (create/push the tag).contents: writeso it can still create the GitHub release (same as today’s tag-triggered run).