-
Notifications
You must be signed in to change notification settings - Fork 7
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
Conversation
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
Co-authored-by: Mitchell Nielsen <[email protected]>
There was a problem hiding this 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 }} |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this mean?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
Will add these |