diff --git a/.github/release-drafter.yaml b/.github/release-drafter.yaml index bef6fe1..22252be 100644 --- a/.github/release-drafter.yaml +++ b/.github/release-drafter.yaml @@ -19,18 +19,6 @@ categories: change-template: "- $TITLE @$AUTHOR (#$NUMBER)" change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. -version-resolver: - major: - labels: - - "major" - minor: - labels: - - "minor" - patch: - labels: - - "patch" - default: patch - autolabeler: - label: "documentation" files: diff --git a/.github/workflows/commits.yml b/.github/workflows/commits.yml index 1d311cc..446f6b6 100644 --- a/.github/workflows/commits.yml +++ b/.github/workflows/commits.yml @@ -11,6 +11,13 @@ jobs: steps: - uses: taskmedia/action-conventional-commits@v0.7.4 + id: cc with: token: ${{ secrets.GITHUB_TOKEN }} types: "fix;feat;revert;chore" + + - name: label PR with version type + if: github.event_name == 'pull_request' && github.event.action == 'opened' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh pr edit ${{ github.event.number }} --add-label "${{ steps.cc.outputs.version_type }}"