Skip to content
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

Release only if changes exist #2

Merged
merged 6 commits into from
Feb 7, 2024
Merged

Conversation

squadgazzz
Copy link
Contributor

Skip the weekly release if there are no changes.

@squadgazzz squadgazzz changed the title Release only if changes persist Release only if changes exist Jan 31, 2024
Copy link
Contributor

@MartinquaXD MartinquaXD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idea makes sense to me but I lack experience with github workflows and zsh to know whether there are subtle issues with it.
Did you test the change for example by temporarily configuring it to trigger on a PR?

- name: Check for changes since last tag
id: check_changes
run: |
LATEST_TAG=$(git tag --sort=-authordate --merged=main | head --lines 1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this needs to sort by commit date in case we merge a commit that was authored before some other commit but only merged afterwards.
Probably an edge case that might never arise but this seems safer regardless.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on pull_request. Switched to committerdate sorting.

@squadgazzz squadgazzz force-pushed the check-changes-before-release branch from 037864f to 6359024 Compare February 6, 2024 12:16
@squadgazzz squadgazzz force-pushed the check-changes-before-release branch from bf59071 to bf3345e Compare February 6, 2024 13:44
@squadgazzz squadgazzz merged commit 44ab49b into main Feb 7, 2024
3 checks passed
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.

3 participants