diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 84656fc8eb..efd512f8c4 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,29 +1,18 @@ # Configuration for Release Drafter: https://github.com/toolmantim/release-drafter -name-template: $NEXT_PATCH_VERSION -# Uses a more common 2-digit versioning in Jenkins weekly releases. +extends: .github +# We use the 2-digit versioning in Jenkins weekly releases. version-template: $MAJOR.$MINOR +name-template: $NEXT_MINOR_VERSION tag-template: jenkins-$NEXT_MINOR_VERSION -exclude-labels: - - reverted - - no-changelog - - skip-changelog - - invalid -change-template: |- - - type: todo - message: |- - $TITLE - pull: $NUMBER - authors: - - $AUTHOR - template: | **Disclaimer**: This is an automatically generated changelog draft for Jenkins weekly releases. - See https://jenkins.io/changelog/ for the official changelogs. + See https://jenkins.io/changelog/ for the official changelogs. + For `changelog.yaml` drafts see GitHub action artifacts attached to release commits. - ```yaml $CHANGES - ``` + + All contributors: $CONTRIBUTORS # Categories will be commented out, because we use YAML # Now we use categories only for sorting @@ -44,17 +33,3 @@ categories: label: developer - title: Internal changes label: internal - -replacers: - - search: '/\[*JENKINS-(\d+)\]*\s*-*\s*/g' - replace: |- - issue: $1 - message: |- - - - search: |- - message: |- - issue: - replace: "issue:" - - - search: "##" - replace: "#" diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 18926fbe81..1c16d431d0 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -14,11 +14,30 @@ jobs: steps: # Drafts your next Release notes as Pull Requests are merged into "master" - name: Generate GitHub Release Draft - uses: release-drafter/release-drafter@v5.4.0 + id: release-drafter + uses: release-drafter/release-drafter@v5.6.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Generates a YAML changelog file using https://github.com/jenkinsci/jenkins-core-changelog-generator - name: Generate YAML changelog draft + id: jenkins-core-changelog-generator uses: jenkinsci/jenkins-core-changelog-generator@master env: GITHUB_AUTH: github-actions:${{ secrets.GITHUB_TOKEN }} + - name: Upload Changelog YAML + uses: actions/upload-artifact@v1 + with: + name: changelog.yaml + path: changelog.yaml +#TODO(oleg-nenashev): It will not work well with Release Drafter which does not recreated releases. Asset does not get overwritten, and there is no ready-to-go API for overriding assets + # Upload YAML to the release draft assets +# - name: Upload changelog.yaml to the Release Draft +# id: upload-changelog-yaml +# uses: actions/upload-release-asset@v1.0.1 +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# with: +# upload_url: ${{ steps.release-drafter.outputs.upload_url }} +# asset_path: ./changelog.yaml +# asset_name: changelog.yaml +# asset_content_type: text/yaml