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

Chore/add automated release or update of major GHA version #60

Merged
merged 10 commits into from
Dec 4, 2024

Conversation

jimid27
Copy link
Contributor

@jimid27 jimid27 commented Dec 4, 2024

  • Resolves: https://linear.app/prefect/issue/PLA-706/automate-actions-prefect-deploy-release-updates
  • Goal of this PR is to automatically repoint or create a new major version of the github action when a semver release is created.
  • In the event that the semver release is just a minor or patch bump of the action, we will repoint the major version i.e v1 to point to that semver sha
  • In the event that a new major release occurs i.e 5.0.0, this action will automatically create a release for the major version i.e v5

@jimid27 jimid27 requested a review from a team as a code owner December 4, 2024 19:25
mitchnielsen
mitchnielsen previously approved these changes Dec 4, 2024
.github/workflows/create-update-release.yaml Outdated Show resolved Hide resolved
@jimid27 jimid27 merged commit 1e88db2 into main Dec 4, 2024
1 check passed
@jimid27 jimid27 deleted the chore/add-automated-release branch December 4, 2024 19:47
Copy link
Contributor

@jamiezieziula jamiezieziula left a comment

Choose a reason for hiding this comment

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

we may want to add the notify-on-failure workflow here so that we are alerted if something goes wrong with this release. Similarly, we may want to add a release script like we have in our internal repos to make creating the release/tag consistent & easy

gh release create "${MAJOR_VERSION}" --title "${MAJOR_VERSION}" --generate-notes --target "${RELEASE_SHA}" --latest
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this can be ref'd by $GITHUB_TOKEN but i could be wrong

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://github.com/elgohr/Github-Release-Action?tab=readme-ov-file#github-release-action I was going off of this referenced by the github actions docs and I think it works since I tested a major bump in my own repo but if theres a better way I'm def down to change!

on:
push:
tags:
# Match the version format to not catch vx major releases
Copy link
Contributor

Choose a reason for hiding this comment

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

what does this mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Means we don't want to run this action when a major version (i.e v5) is tagged and released

Copy link
Contributor

Choose a reason for hiding this comment

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

what is the else statement doing then if not running on a major release?

@jimid27
Copy link
Contributor Author

jimid27 commented Dec 4, 2024

we may want to add the notify-on-failure workflow here so that we are alerted if something goes wrong with this release. Similarly, we may want to add a release script like we have in our internal repos to make creating the release/tag consistent & easy

Will add these

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