-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat: allow labels to bump patch/minor versions #50
Conversation
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.
yee
if [ "${{ steps.bump-type.outputs.type }}" == "minor" ]; then | ||
new_version="$major.$((minor + 1)).0" | ||
else | ||
new_version="$major.$minor.$((patch + 1))" | ||
fi | ||
|
||
sed -i "s/const Version = \"$current_version\"/const Version = \"$new_version\"/" version.go | ||
echo "::set-output name=new_version::$new_version" |
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.
deploy scripts always look so dastardly; I love it.
run: | | ||
if [[ $(GITHUB_TOKEN=${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }} gh pr view ${{ github.event.pull_request.number }} --json labels -q '.labels[].name' | grep -q "minor") ]]; then | ||
echo "type=minor" >> $GITHUB_OUTPUT | ||
else | ||
echo "type=patch" >> $GITHUB_OUTPUT | ||
fi |
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.
good call not supporting major version bumps; I don't want to deal with v2 yet.
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.
1000% - that will be a manual process anyways
We need to make sure that every land to master bumps the version so people can pin a version with confidence. This allows that.