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

Possible enhancement - Add changelog for this repo for automating release tags. ❤️☕️💡 #177

Merged

Conversation

Tatsinnit
Copy link
Member

@Tatsinnit Tatsinnit commented Jan 2, 2023

Intent of the PR

This PR adds the ChangeLog file which will become one file for all the release versions, it kind of follows the keep-the-changelog-standard notion and just one file for all user/PM et. al. to look at to see releases.

  • This PR doesn't change the current release behaviour, it just automating the release tag creation mechanism, which means repo owners don't need to add release tags and they will be automatically done at the end of the release triggered. In long term if we start and change of binaries with version number then we can add that easily from this release action file.

Screenshot below is from my fork to show it is working.

  • Things to check: Does current mechanism has any dependency of order aka, release tag needs to be created first before release. (as far as I can see its something to do with main branch and how release happens because even from my fork I see the publish looks for release_id route.)

What is it and advantages it will give & long term benefits for full automation.

As this project will expand and many new contributor might come, the key advantages I see are :

  • This encourages more human readable release notes, release automation and more encourages philosophy of “keep all under one roof with structure” strategy in Github project.
  • Encourages more peer/ownership eyes, since changelog.md PR is separate pull request and key stakeholders can review things before release goes out.
  • Avoid ghost releases.
  • Avoid commit scavenging for OSS readers or those who are new to the repo.

Thank you so much for reading this and hope this will add value to this repo. ❤️☕️🙏 I hope this helps in long term full automation.

Screenshots:

Screenshot 2023-01-02 at 3 14 45 PM

Screenshot 2023-01-02 at 3 15 16 PM

@weinong
Copy link
Contributor

weinong commented Jan 10, 2023

i'm not forgetting this PR. Will find some time to review it!

GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Create Release with artifacts
- name: Create Kubelogin Release
if: ${{ steps.check-tag-exists.outputs.exists == 'false'}}
Copy link
Contributor

Choose a reason for hiding this comment

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

sometimes release may fail when publishing artifacts. would this prevent us from re-running the release?

Copy link
Member Author

@Tatsinnit Tatsinnit Jan 27, 2023

Choose a reason for hiding this comment

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

☕️❤️🥷 Thank you so much for this, I did thought about it, and released we have 2/3 options:

  • Option 1 - In special case where there are no clear build failure signals and artefacts not published we (dev) could just delete that release tag and restart the workflow.

    • In case of build failure since it runs under same job the workflow will break early and release tag will never be created.
  • Option 2 - We could separate out these 2 workflow as following:

    • Publish workflow - which is responsible for build and artefact publish, then comes,
    • Release tag workflow - which creates the release et. al.
  • Option 3 - We can explore this: How to prevent creating multiple releases when using a build matrix? actions/create-release#14 (comment) - so we check the url if artefacts are there, if not don't succeed with release tag.

We still be able to automate both the process, Its dev responsibility to first make sure Publish runs correctly and artefacts are present and then run Create Release action.

  • In the mean time I will see if there is any artefact signal we can check before Crete release tag et. al.

But, please share your thoughts from above and what do you think :) Thank you so much for this discussion.

Copy link
Contributor

Choose a reason for hiding this comment

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

Typically it's the last step in publishing artifacts that failed. Code building steps are run before releasing. Option 1 is good for me. Would you mind updating readme.md below please?

Copy link
Member Author

Choose a reason for hiding this comment

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

☕️ sounds good, I will update and push. Thank you so much for this ❤️🙏

Copy link
Contributor

Choose a reason for hiding this comment

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

@Tatsinnit can you rebase? I just merged another change

Copy link
Contributor

Choose a reason for hiding this comment

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

btw, in your test release, I don't see published artifacts? is this order right? should release be created before publishing artifacts?

Copy link
Member Author

@Tatsinnit Tatsinnit Jan 31, 2023

Choose a reason for hiding this comment

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

☕️🥷🙏 Thank you so much, sorry was flying (air travelling) hence no replies, now I am land based. Done and successful release link from my fork below. Oh in my test runs, I think it must be release_id which is getting used for Publish step which was not obvious before you asked, I will pass it, also I notices that for Publish to Snap Store step some secret is used so from my fork I removed that step to show the success build: (With Publish to Snap Store step as well the build and publish happened but I have shared the runner message below.)

I will add readme changes for a scenario where any failure after successful build and publish happened. (As a recommendation for engineers to delete unsuccessful release tag and release notes.)

Screenshot 2023-02-01 at 3 59 45 AM

Vs Now working:

Screenshot 2023-02-01 at 5 58 23 AM

@Tatsinnit Tatsinnit force-pushed the feature/automate-releasetag-add-changelog branch from 9395cc2 to 4175c21 Compare January 27, 2023 11:14
@Tatsinnit Tatsinnit force-pushed the feature/automate-releasetag-add-changelog branch from 4175c21 to ccbdad2 Compare January 31, 2023 14:08
Copy link
Contributor

@weinong weinong left a comment

Choose a reason for hiding this comment

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

LGTM

@weinong weinong merged commit 14dc89e into Azure:master Jan 31, 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