-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: add publish for custom version #309
Conversation
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.
Could you please have a look at: https://semantic-release.gitbook.io/semantic-release/recipes/release-workflow/maintenance-releases
Maybe that would fit your needs and would not require that many changes in reusable workflow?
@@ -785,7 +811,7 @@ jobs: | |||
if: | | |||
!cancelled() && | |||
needs.build.result == 'success' && | |||
( github.base_ref == 'main' || github.ref_name == 'main' ) | |||
( github.base_ref == 'main' || github.ref_name == 'main' || github.ref_name == 'develop') |
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.
Consider adding additional restriction to run appinspect-api only for github event pull_request so we can limit a bit amount of appinspect-api executions (observed in past problems with scans when appinspect api was overused)
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.
Done - used base_ref
instead of ref_name
for develop
branch
@@ -2086,9 +2113,12 @@ jobs: | |||
exit 1 | |||
|
|||
publish: | |||
if: ${{ !cancelled() && needs.pre-publish.result == 'success' && github.event_name != 'pull_request' && github.event_name != 'schedule' }} | |||
if: ${{ !cancelled() && needs.pre-publish.result == 'success' && github.event_name != 'pull_request' && github.event_name != 'schedule' || (github.event.inputs.custom-version != '' && needs.validate-custom-version.result == 'success') }} |
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.
I think you need to include in second group of OR conditions !cancelled() && needs.pre-publish.result == 'success'
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.
Resolved
- name: Download package-deployment | ||
if: ${{ steps.semantic.outputs.new_release_published == 'true' }} | ||
if: ${{ steps.semantic.outputs.new_release_published == 'true' || github.event.inputs.custom-version != ''}} |
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.
Could we rather rely on some output of step Release custom version?
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.
Resolved - now checking if upload_url
output exists for the custom release step
8572827
to
2b87637
Compare
@mkolasinski-splunk we've already considered this option before, however this won't fully fit our needs. This functionality from |
Latest updatesI took over the PR from Kamil and introduced 2 important changes:
Testing done
|
ddaddd5
to
f0351d1
Compare
Latest updates v2As per discussion with @mkolasinski-splunk and @wtobis-splunk, I updated the PR as follows:
Testing doneTests on push to
|
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.
There are pre-commit issues in CI that needs to be fixed.
0b75662
to
7f06ea7
Compare
7f06ea7
to
efb57ff
Compare
@mkolasinski-splunk linting issue fixed |
🎉 This PR is included in version 4.17.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Background
In certain scenarios, some clients prefer not to update to the latest version of the software but require critical bug fixes in their current version. This necessitates bypassing the automated versioning provided by semantic-release, allowing for a manually specified version to be released.
Changes Introduced
In this PR, I've introduced a dispatcher to the workflow, enabling users to specify a custom version when triggering a release. This enhancement provides greater flexibility, particularly for clients who need targeted updates without adopting the latest release.
Key Implementations:
Discussion Point:
Tag Creation and Workflow Rerun: Currently, when a custom version is used and a package is released, the workflow is triggered again because a tag is created. This raises the question: Is it necessary to trigger the workflow with a tag, or should we consider an alternative approach to prevent redundant workflow executions? Feedback on this point would be appreciated.
Test branch:
https://github.com/splunk/splunk-add-on-for-microsoft-cloud-services/actions/runs/10353886295
References
Implementation docs: https://docs.google.com/document/d/1Qenm338CyoeZHo3M_dbX5GJD1SDmlLhz1Jfpg7VWrPg/edit
GitHub Action: softprops/action-gh-release@v2