ci(macos): skip tests on tags containing "prerelease" #162

Merged
gronod merged 1 commits from chore/ci-prerelease-skip into develop 2026-09-13 21:04:40 +01:00
Owner

Summary

Tag pushes matching v* whose name contains the literal substring prerelease now skip the test build and both test legs in build-and-test, while the package job still builds, signs, notarizes, and attaches the DMG. Also fixes scripts/attach-release-asset.sh so the release's prerelease flag is derived from the tag name instead of being hardcoded true.

Changes

  • .gitea/workflows/macos.yml
    • Step-level if: "!(startsWith(github.ref, 'refs/tags/') && contains(github.ref_name, 'prerelease'))" on: Ensure host tools, Generate Xcode project, Build for testing (host arch), Sign package product frameworks, Test unit (ICCeryCoreTests), Test UI (ICCeryUITests).
    • Checkout and Assert Xcode 14+ toolchain remain unconditional so the job still succeeds quickly and package's needs: stays satisfied.
    • Failure-path steps (Prepare Node CA bundle (failure path), Upload UI test xcresult) extended to failure() && !(...) — no xcresult exists when tests never ran.
    • package job unchanged; its if already covers refs/tags/v*.
    • Conditions are double-quoted because an unquoted YAML scalar starting with ! is a fatal syntax error.
  • scripts/attach-release-asset.sh
    • PRERELEASE derived via case "$TAG" in *prerelease*) — so full releases like v2.1.0 are no longer auto-created as prereleases. HTTP 200 (existing release) path untouched.

Decisions

  • Literal substring prerelease only; existing tags (v2.0.0-pre1, -pre2-grok, -monterey) keep running tests.
  • Step-level guards (not job-level if) so needs: build-and-test is satisfied without relying on runner-specific needs.*.result semantics.
  • main not added to push triggers.

Verification

  • ruby -ryaml -e 'YAML.load_file(...)' → YAML OK
  • sh -n scripts/attach-release-asset.sh → OK
  • Offline tag-logic test: v2.1.0/v2.0.0-pre1prerelease=false; v2.1.0-prerelease/v2.1.0-prerelease.1prerelease=true.
  • This PR's CI run exercises the "tests still run" path; the skip path activates only on a v*...prerelease* tag push.
## Summary Tag pushes matching `v*` whose name contains the literal substring `prerelease` now skip the test build and both test legs in `build-and-test`, while the `package` job still builds, signs, notarizes, and attaches the DMG. Also fixes `scripts/attach-release-asset.sh` so the release's `prerelease` flag is derived from the tag name instead of being hardcoded `true`. ## Changes - `.gitea/workflows/macos.yml` - Step-level `if: "!(startsWith(github.ref, 'refs/tags/') && contains(github.ref_name, 'prerelease'))"` on: `Ensure host tools`, `Generate Xcode project`, `Build for testing (host arch)`, `Sign package product frameworks`, `Test unit (ICCeryCoreTests)`, `Test UI (ICCeryUITests)`. - `Checkout` and `Assert Xcode 14+ toolchain` remain unconditional so the job still succeeds quickly and `package`'s `needs:` stays satisfied. - Failure-path steps (`Prepare Node CA bundle (failure path)`, `Upload UI test xcresult`) extended to `failure() && !(...)` — no xcresult exists when tests never ran. - `package` job unchanged; its `if` already covers `refs/tags/v*`. - Conditions are double-quoted because an unquoted YAML scalar starting with `!` is a fatal syntax error. - `scripts/attach-release-asset.sh` - `PRERELEASE` derived via `case "$TAG" in *prerelease*)` — so full releases like `v2.1.0` are no longer auto-created as prereleases. HTTP 200 (existing release) path untouched. ## Decisions - Literal substring `prerelease` only; existing tags (`v2.0.0-pre1`, `-pre2-grok`, `-monterey`) keep running tests. - Step-level guards (not job-level `if`) so `needs: build-and-test` is satisfied without relying on runner-specific `needs.*.result` semantics. - `main` not added to push triggers. ## Verification - `ruby -ryaml -e 'YAML.load_file(...)'` → YAML OK - `sh -n scripts/attach-release-asset.sh` → OK - Offline tag-logic test: `v2.1.0`/`v2.0.0-pre1` → `prerelease=false`; `v2.1.0-prerelease`/`v2.1.0-prerelease.1` → `prerelease=true`. - This PR's CI run exercises the "tests still run" path; the skip path activates only on a `v*...prerelease*` tag push.
gronod added the
Priority
Medium
3
Project/ICCery-v2Feature/DevOps
labels 2026-09-13 20:41:54 +01:00
gronod added 1 commit 2026-09-13 20:41:55 +01:00
ci(macos): skip tests on tags containing "prerelease"
macOS CI / build-and-test (pull_request) Successful in 37m58s
macOS CI / package (pull_request) Skipped
16df18127c
gronod merged commit 83b5f6bf75 into develop 2026-09-13 21:04:40 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gronod/iccery-v2-mac#162