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

GHA to create release #437

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

rodrigozhou
Copy link
Contributor

@rodrigozhou rodrigozhou commented Jul 19, 2024

What changed?
GHA to create, publish and delete releases.

  • create-release: manually triggered, it validates the input, checks compatibility with sdk-go, and creates draft releases in api and api-go.
  • publish-release: triggered when a release is published, it publishes the corresponding api-go release.
  • delete-release: triggered when a release is deleted, it deletes the corresponding api-go release (only works for deleting draft releases).

Why?
Automation.

Breaking changes

Server PR

@rodrigozhou rodrigozhou requested review from a team as code owners July 19, 2024 06:53
@cretz
Copy link
Member

cretz commented Jul 19, 2024

Can you give some background on the savings here on starting a GH workflow vs publishing release in GH?

@rodrigozhou rodrigozhou force-pushed the rodrigozhou/gha-create-tag branch from 5d836bc to bddfbea Compare December 6, 2024 18:52
Copy link
Member

@cretz cretz left a comment

Choose a reason for hiding this comment

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

As mentioned at temporalio/api-go#170 (review), I am a bit concerned about the maintenance of these two workflows for such an incredibly simple thing, but if y'all are resolving to maintain them and are now in full control of the release process of this and the API repo, ok.

@rodrigozhou rodrigozhou force-pushed the rodrigozhou/gha-create-tag branch from d0cd2bf to 2cab9a7 Compare December 10, 2024 20:33
@rodrigozhou rodrigozhou requested a review from bergundy December 12, 2024 05:00
.github/workflows/create-tag.yml Outdated Show resolved Hide resolved
base_tag:
description: "Base tag to generate commit list for release notes"
required: false
skip_sdk_check:
Copy link
Member

Choose a reason for hiding this comment

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

This shouldn't be allowed.

Copy link
Contributor Author

@rodrigozhou rodrigozhou Dec 17, 2024

Choose a reason for hiding this comment

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

@cretz mentioned a use case here: temporalio/sdk-go#1749 (review)

Thanks! Note, when making the api side, you may want the ability to bypass. The reason one might want to bypass is because we know the API is incompatible and we plan on tagging a new Go SDK release with the new API release immediately after API release is complete.

.github/workflows/create-tag.yml Outdated Show resolved Hide resolved
@rodrigozhou rodrigozhou requested a review from bergundy December 18, 2024 00:37
@rodrigozhou rodrigozhou changed the title GHA to create tag/release GHA to create release Dec 18, 2024
Comment on lines +93 to +96
if: |
!cancelled() &&
needs.prepare-inputs.result == 'success' &&
contains(fromJSON('["success", "skipped"]'), needs.check-compatibility-sdk-go.result)
Copy link
Member

Choose a reason for hiding this comment

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

I would have imagined this would be the default, is it not so?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Github actions doesn't work well when the dependency has a condition for running.
In this case, the check-compatibility-sdk-go job runs only if the flag is set. So, even if I add it to needs, the create-release job never runs. So, I need to manually check the conditions.

@rodrigozhou rodrigozhou force-pushed the rodrigozhou/gha-create-tag branch from fa660a1 to 8a60658 Compare December 20, 2024 04:30
@rodrigozhou rodrigozhou requested a review from bergundy December 20, 2024 04:30
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