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

fix finalize release 4.1.x #5944

Merged
merged 5 commits into from
Sep 6, 2023
Merged

Conversation

DanRod1999
Copy link
Contributor

@DanRod1999 DanRod1999 commented Sep 6, 2023

Fixes error with push command by including origin in cmd.

Fixes the removal of extra newline characters to be more readable.

Upgrades to action/checkoutV3

Add authtoken to checkout step. From testing in a dummy repo, this token also appears to be what authorizes the push later in the pipeline. Also tested pushing to a protected branch with an authorized user and it worked correctly.

Changes trigger from tag to on commits to branches with release/* and updates to files with the path **/CHANGELOG.md, this is because when the workflow is triggered by a tag, the default branch that gets checkout is in a detached head state, and checking out to a new branch doesn't correct this. I believe using git switch might work, however this is easier because I use the branch name to detect what the target branch for the change logs should be. The branch name when a tag is checked out is not the same name as the source branch, so it would require different logic to get the target branch. Switching to this was also makes it simpler for running the script locally.

@mergify mergify bot requested a review from a team September 6, 2023 14:57
@DanRod1999
Copy link
Contributor Author

ran a final test in the workflow itself, and created this branch to make sure everything is working as intended. This would be an example of 4.1.x changes going into master.
master...finalize-release-Test

I will delete this branch after this PR is merged.

@DanRod1999
Copy link
Contributor Author

Also based on the changes to the triggers I realized that when this runs in 3.7.x, it will push updated logs to release/4.1.x, and then because 4.1.x update changelog files, it will automatically trigger this workflow again to update master branch.

@DanRod1999 DanRod1999 marked this pull request as ready for review September 6, 2023 18:07
@DanRod1999 DanRod1999 merged commit 7fed93b into release/4.1.x Sep 6, 2023
11 checks passed
@DanRod1999 DanRod1999 deleted the dan/fix-finalize-release-4.1.x branch September 6, 2023 19:57
imodeljs-admin added a commit that referenced this pull request Sep 6, 2023
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.

2 participants