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

[CI/CD] WIP: Re-use Workflows to Ensure GitHub Pages is built after every pre-release - Cleanup Workflow Naming Inconsistency - Remove 'release.yaml' workflow #2471

Conversation

og-mrk
Copy link
Contributor

@og-mrk og-mrk commented Jul 28, 2024

Type of Change

  • Refactoring
  • CI/CD improvement

Description

This PR Fixes the close=discussion workflow not working in specific edge cases (when there's no linking to any issue or discussion, bash will crash 😅, see commit 416ab76 for the fix), and fixes createchangelog workflow which won't work in specific instances, like when you edit/delete a release, or when main branch is updated (something to do with actions/checkout action, plus how GitHub gives triggered Workflows their ref & the derived ref_name github environments/built-ins).

Besides simple fixes highlighted above, it also tries to make future deployments of winutil easier, by making use of GitHub Actions Reusable Workflows, now you can run a single workflow that'll call another workflow, and so on (up until three-layers deep (4 including the triggered workflow), source).

Diagram

image

Testing

As shown in latest run using these changes (link to it), it works as intended.

Fixes to close-discussion can be seen in PR og-mrk#27 & its run (when the author of PR doesn't specify any issues/discussions), plus PR og-mrk#28 & its run (fails because the IDs given are either not valid (not found in current repo) or simply doesn't exist, or it isn't a discussion (maybe an issue)).

The fix for createchangelog workflow is coming soon...

Impact

Makes sure that the Changelog is up-to-date with every release.

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no errors/warnings/merge conflicts.

@og-mrk og-mrk requested a review from ChrisTitusTech as a code owner July 28, 2024 05:54
@og-mrk og-mrk force-pushed the workflow-update/fix-createchangelog-not-running branch from 1656a89 to 3f66851 Compare July 28, 2024 06:05
@og-mrk og-mrk force-pushed the workflow-update/fix-createchangelog-not-running branch 2 times, most recently from 77da72d to 2d95b12 Compare July 28, 2024 17:55
@og-mrk og-mrk changed the title [CI/CD] Re-use Workflows - Ensure GitHub Pages is built after every pre-release [CI/CD] Re-use Workflows to Ensure GitHub Pages is built after every pre-release - Cleanup Workflow Naming Inconsistency - Remove 'release.yaml' workflow Jul 28, 2024
@og-mrk og-mrk marked this pull request as draft July 28, 2024 18:13
@og-mrk og-mrk changed the title [CI/CD] Re-use Workflows to Ensure GitHub Pages is built after every pre-release - Cleanup Workflow Naming Inconsistency - Remove 'release.yaml' workflow [CI/CD] WIP: Re-use Workflows to Ensure GitHub Pages is built after every pre-release - Cleanup Workflow Naming Inconsistency - Remove 'release.yaml' workflow Jul 28, 2024
@og-mrk og-mrk force-pushed the workflow-update/fix-createchangelog-not-running branch from e710423 to 78e1487 Compare July 28, 2024 18:46
@og-mrk og-mrk force-pushed the workflow-update/fix-createchangelog-not-running branch from 78e1487 to 6c5c869 Compare July 28, 2024 18:49
@og-mrk og-mrk force-pushed the workflow-update/fix-createchangelog-not-running branch from 58986e9 to 753d9f9 Compare July 28, 2024 19:01
@og-mrk og-mrk force-pushed the workflow-update/fix-createchangelog-not-running branch from 822a92d to 0d12b0c Compare July 29, 2024 02:29
@og-mrk og-mrk force-pushed the workflow-update/fix-createchangelog-not-running branch from 0dfbeaa to c26bced Compare July 29, 2024 07:01
…here Found' step in 'close-discussion' workflow
@og-mrk og-mrk force-pushed the workflow-update/fix-createchangelog-not-running branch from c26bced to 416ab76 Compare July 29, 2024 07:04
@og-mrk og-mrk force-pushed the workflow-update/fix-createchangelog-not-running branch from 6178f3d to 51e13fa Compare July 31, 2024 02:40
@og-mrk og-mrk force-pushed the workflow-update/fix-createchangelog-not-running branch from 5e6e21f to 1982579 Compare August 1, 2024 13:50
@MyDrift-user
Copy link
Contributor

could you maybe if PR #2481 gets merged first change the logics to first run the docs script, then build the docs page and in the end do the release?

@og-mrk
Copy link
Contributor Author

og-mrk commented Aug 5, 2024

could you maybe if PR #2481 gets merged first change the logics to first run the docs script, then build the docs page and in the end do the release?

Sure thing @MyDrift-user, I'll make sure to test it as well 👍

@MyDrift-user MyDrift-user mentioned this pull request Aug 5, 2024
6 tasks
@Real-MullaC
Copy link
Contributor

Make sure this also includes pre releases but make sure in docs it looks like a normal release to cause no issues in WinUtil.

@ChrisTitusTech
Copy link
Owner

You are doing too much with this PR... Changing the names should be its own PR. That way we can easily see what changes with the workflows. I will close this in it's current state.

@ChrisTitusTech
Copy link
Owner

Don't like the change in file name extensions as I can't analyze the difference between them well.

@ChrisTitusTech ChrisTitusTech added the skip-changelog Skip Change Logs label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Skip Change Logs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants