diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..4de1782 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,37 @@ +name-template: 'v$RESOLVED_VERSION' +tag-template: 'v$RESOLVED_VERSION' +categories: + - title: '🚀 Features' + labels: + - 'feature' + - 'enhancement' + - title: '🐛 Bug Fixes' + labels: + - 'fix' + - 'bugfix' + - 'bug' + - title: '🧰 Maintenance' + labels: + - 'chore' + - 'dependencies' +change-template: '- $TITLE @$AUTHOR (#$NUMBER)' +change-title-escapes: '\<*_&' # You can add # and @ to disable mentions +version-resolver: + major: + labels: + - 'major' + minor: + labels: + - 'minor' + patch: + labels: + - 'patch' + default: patch +template: | + ## Changes + + $CHANGES + + ## Contributors + + $CONTRIBUTORS diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index ce57cdb..617e8dc 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -12,16 +12,22 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 + ref: main + - name: Get version from tag + id: get_version + run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT + - name: Generate Release Notes - id: generate_notes - uses: TriPSs/conventional-changelog-action@v3 + uses: release-drafter/release-drafter@v5 + id: release_drafter + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - github-token: ${{ secrets.GITHUB_TOKEN }} - skip-version-file: true - skip-commit: true - skip-tag: true - output-file: false + config-name: release-drafter.yml + tag: ${{ github.ref_name }} + version: ${{ github.ref_name }} + publish: false - name: Create Release id: create_release @@ -31,7 +37,7 @@ jobs: with: tag_name: ${{ github.ref }} release_name: Release ${{ github.ref }} - body: ${{ steps.generate_notes.outputs.clean_changelog }} + body: ${{ steps.release_drafter.outputs.body }} draft: false prerelease: false