Skip to content

Conversation

@ssestak
Copy link
Contributor

@ssestak ssestak commented Aug 21, 2025

This PR introduces a force_build input to the ios-selfhosted-build.yml workflow, enabling builds to proceed even if change detection would normally skip them. It also adjusts subsequent steps to respect this new input and provides a specific changelog for forced builds.

Key Features

  • Added a force_build boolean input to the workflow.
  • Modified build-related steps (Fastlane, IPA/dSYM upload) to execute when force_build is true, bypassing change detection.
  • Introduced a specific changelog message ("Forced build") when force_build is active.
  • Ensured commit SHA saving and caching steps are skipped during forced builds.

Workflow Input

Input Name Type Description Default
force_build boolean If true, skip change detection and force a build. false

Šimon Šesták added 3 commits August 15, 2025 14:05
This change introduces a new `force_build` input to the `ios-selfhosted-build.yml` workflow.
This allows users to bypass the change detection mechanism and force a build to run,
regardless of whether relevant code changes have been detected.

This is particularly useful for:
- Manually triggering a build for a specific commit.
- Re-running a failed build without making new code changes.
- Ensuring a build is always produced for a given branch or tag.

When `force_build` is set to `true`:
- The `universal-detect-changes-and-generate-changelog` action is skipped.
- Build-related steps (Fastlane, IPA/dSYM upload) are executed unconditionally.
- The changelog for the build is set to "Forced build".
- The latest build commit SHA is not saved or cached, as it's not based on detected changes.
The `ios-selfhosted-build.yml` workflow was incorrectly evaluating the `force_build` input as a string literal `'true'` or `'false'`. This commit changes the comparison to treat `force_build` as a boolean value directly.

- Previously, `inputs.force_build` was compared against the string `'true'`.
- Now, `inputs.force_build` is compared against the boolean `true`.

This ensures that the `force_build` input is correctly interpreted, allowing the workflow to behave as expected when a forced build is triggered.
The `if` condition `inputs.force_build != true` was removed from the "Detect changes and get changelog" step in the `ios-selfhosted-build.yml` workflow.

This ensures that the change detection and changelog generation action always executes, regardless of whether a build is being forced. This is crucial for:
- Maintaining consistent and accurate changelogs for releases.
- Ensuring that change detection logic is always applied, even in scenarios where a build is manually triggered or forced.

This change prevents potential inconsistencies in changelog generation when `force_build` is true.
@jmarek41 jmarek41 merged commit 3e404e6 into main Sep 3, 2025
1 check passed
@jmarek41 jmarek41 deleted the feature/Add-force-build-option branch September 3, 2025 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants