-
Notifications
You must be signed in to change notification settings - Fork 4
[AOB-353] Release process support in github workflows #14
Conversation
…man-go-sdk into feature/release-process
…ic of a merge conflcit
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 |
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 fetch-depth do ?
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.
If we don't use fetch-depth=0 then it will do a shallow fetch of the latest commit. Which is the best case in most scenarios, but here we want to find older tags, which will not come with a shallow fetch. Hence, we're fetching the complete repo. This would be troublesome for large repos, we won't have that problem. ref: actions/checkout#701
echo "new_tag=$new_tag" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Version check result | ||
if: steps.latest_tag.outputs.latest_tag == steps.set_tag.outputs.new_tag |
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.
devil's advocate what is it's latest<new_tag
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.
Yeah, had the same thought, not sure how to handle that though. We could match against all existing tags as well. Will see if that is possible here.
.github/workflows/release.yml
Outdated
tag_prefix: '' | ||
|
||
- name: Create a GitHub release | ||
uses: ncipollo/[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.
both are single maintainer projects, should we rely on them ?
nodejs is using this
postman-eng/action-gh-release@v1
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.
Will check if it produces the same release style then we're good to go 👍🏼
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.
Also nodejs push tags to master was failing in action, because master is protected branch.
AFAIK there is no way in github action to allow github bots to push.
How's that solved here ?
Can we create a contributing.md file, with actual commands to release a new version ? |
To release a new version, update the
version.go
file indevelop
, and then fast-forward merge develop into master. That will auto-create the tag and the release.Example release that was created: https://github.com/postmanlabs/postman-go-sdk/releases (from an old tag)