Skip to content

Commit

Permalink
Fix auto-version bumping based on PR labels (#1586)
Browse files Browse the repository at this point in the history
## Description

Fixes version bumping in release drafter workflow. You can label a PR
with `major`, `minor`, or `patch` to indicate which component of the
version number the PR should increment (defaults to `patch` for
unlabeled PRs). The release drafter will tag & name the draft release
according to the maximum bumped version component of the set of PRs in
the release.

## Changes

- Uses the correct variable for tagging & describing the draft release
- Updates some permissions in the action

- [ ] I have reviewed the [Guidelines for Contributing](CONTRIBUTING.md)
and the [Code of Conduct](CODE_OF_CONDUCT.md).
  • Loading branch information
richard-rogers authored Nov 6, 2024
1 parent 471aa71 commit 7702fe4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name-template: "v$NEXT_PATCH_VERSION"
tag-template: "v$NEXT_PATCH_VERSION"
name-template: "v$RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"
change-template: "- $TITLE #$NUMBER [@$AUTHOR]"

categories:
Expand Down Expand Up @@ -45,8 +45,8 @@ version-resolver:

template: |
## whylogs release v$NEXT_PATCH_VERSION
Hi everyone! We’ve now released whylogs $NEXT_PATCH_VERSION 🚀.
## whylogs release v$RESOLVED_VERSION
Hi everyone! We’ve now released whylogs $RESOLVED_VERSION 🚀.
whylogs is the open standard for data and ML logging created by WhyLabs. 👩🏽‍🔬
This version includes:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ on:
branches:
- mainline

permissions:
contents: read

jobs:
update_release_draft:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "mainline"
Expand Down

0 comments on commit 7702fe4

Please sign in to comment.