-
Notifications
You must be signed in to change notification settings - Fork 735
Update release workflow: Remove test functionality and add publish_only option
#629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
publish_only option
ba88fc2 to
caa7834
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request refines the release workflow by updating input parameters, dependencies, and simplifying the conditional logic in the release process.
- Replaces the 'test_fail' input with a new 'publish_only' input.
- Updates dependency versions (actions/checkout and OS version).
- Adds conditional checks to skip version commits, tag creation, and commit information saving when 'publish_only' is enabled.
Comments suppressed due to low confidence (1)
.github/workflows/release.yml:124
- [nitpick] The 'rollback' job still uses actions/checkout@v2 while the main release job has been updated to actions/checkout@v4. Consider updating it for consistency and potential improvements.
uses: actions/checkout@v2
| - name: Commit version update | ||
| id: commit_version | ||
| if: ${{ github.event.inputs.publish_only != 'true' }} |
Copilot
AI
May 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition compares the boolean 'publish_only' input to the string 'true'. It is recommended to use boolean comparisons (e.g., if: ${{ !github.event.inputs.publish_only }}) to avoid potential type inconsistencies.
| if: ${{ github.event.inputs.publish_only != 'true' }} | |
| if: ${{ !github.event.inputs.publish_only }} |
| if: ${{ github.event.inputs.publish_only != 'true' }} | ||
| run: | | ||
| COMMIT_SHA=$(git rev-parse HEAD) | ||
| echo "commit_sha=$COMMIT_SHA" >> $GITHUB_OUTPUT | ||
| - name: Test failure - After commit | ||
| if: ${{ github.event.inputs.test_fail == 'mid' }} | ||
| run: | | ||
| echo "Intentionally failing after commit but before tag for testing" | ||
| exit 1 | ||
| - name: Create git tag | ||
| id: create_tag | ||
| if: ${{ github.event.inputs.publish_only != 'true' }} |
Copilot
AI
May 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition compares the boolean 'publish_only' input to the string 'true'. Consider using a proper boolean check for clarity and consistency.
| if: ${{ github.event.inputs.publish_only != 'true' }} | ||
| run: | | ||
| COMMIT_SHA=$(git rev-parse HEAD) | ||
| echo "commit_sha=$COMMIT_SHA" >> $GITHUB_OUTPUT | ||
| - name: Test failure - After commit | ||
| if: ${{ github.event.inputs.test_fail == 'mid' }} | ||
| run: | | ||
| echo "Intentionally failing after commit but before tag for testing" | ||
| exit 1 | ||
| - name: Create git tag | ||
| id: create_tag | ||
| if: ${{ github.event.inputs.publish_only != 'true' }} |
Copilot
AI
May 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition compares the boolean 'publish_only' input to the string 'true'. Use a boolean expression to improve reliability and readability.
| - name: Publish to CocoaPods | ||
| if: ${{ !github.event.inputs.dry_run && github.event.inputs.test_fail != 'any' }} | ||
| if: ${{ github.event.inputs.dry_run != 'true' }} |
Copilot
AI
May 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'dry_run' input is defined as a boolean, so comparing it against the string 'true' might lead to unexpected behavior. Consider using a boolean check (e.g., if: ${{ !github.event.inputs.dry_run }}) for consistency.
| if: ${{ github.event.inputs.dry_run != 'true' }} | |
| if: ${{ !github.event.inputs.dry_run }} |
| runs-on: macos-15 | ||
| needs: release | ||
| if: failure() | ||
| if: failure() && github.event.inputs.publish_only != 'true' |
Copilot
AI
May 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition compares the boolean 'publish_only' input to the string 'true'. Use a boolean check (e.g., && !github.event.inputs.publish_only) for proper evaluation.
| if: failure() && github.event.inputs.publish_only != 'true' | |
| if: failure() && !github.event.inputs.publish_only |
…nly` option (kstenerud#629) * Update release workflow: remove test functionality and add skip_tag option * Update release workflow: rename parameter to publish_only and clarify descriptions * Fix workflow conditions to properly handle all parameter combinations * Use macOS-15 runner and upgrade checkout to v4
This pull request updates the
.github/workflows/release.ymlfile to improve the release workflow by refining input parameters, updating dependencies, and simplifying the logic. The most important changes include replacing thetest_failinput with a newpublish_onlyinput, updating dependencies, and adding conditional checks to streamline the workflow.Input Parameter Updates:
test_failinput with a newpublish_onlyinput, which allows publishing to CocoaPods without version updates or tagging. Updated descriptions forversionanddry_runinputs for clarity. ([.github/workflows/release.ymlL7-R35](https://github.com/kstenerud/KSCrash/pull/629/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34L7-R35))Dependency Updates:
runs-ontomacos-15and upgraded theactions/checkoutdependency fromv2tov4. ([.github/workflows/release.ymlL7-R35](https://github.com/kstenerud/KSCrash/pull/629/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34L7-R35))Workflow Logic Simplifications:
test_faillogic) for various stages of the workflow, simplifying the process. ([[1]](https://github.com/kstenerud/KSCrash/pull/629/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34L55-L60),[[2]](https://github.com/kstenerud/KSCrash/pull/629/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34L121-R121))publish_onlyis set totrue. ([[1]](https://github.com/kstenerud/KSCrash/pull/629/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34R83),[[2]](https://github.com/kstenerud/KSCrash/pull/629/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34R93-R100),[[3]](https://github.com/kstenerud/KSCrash/pull/629/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34R93-R100))