From e335788e632258fda76334cc8c947bc4c04fdd14 Mon Sep 17 00:00:00 2001 From: Yidi Date: Sat, 5 Oct 2024 16:11:17 -0400 Subject: [PATCH] ci: simplify release workflow by combining note generation and publishing The release workflow has been streamlined by merging the steps for generating release notes and creating a release into a single action. This change reduces redundancy, as it eliminates the need for a separate step to create the release after generating notes. The workflow now directly publishes the generated release notes, enhancing efficiency and clarity in the release process. Additionally, the release name template in release-drafter has been updated for better readability and consistency. --- .github/release-drafter.yml | 2 +- .github/workflows/create-release.yml | 18 +++++------------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index a1dba19..3d7182e 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,4 +1,4 @@ -name-template: 'v$NEXT_PATCH_VERSION 🌈' +name-template: 'v Release $NEXT_PATCH_VERSION 🌈' tag-template: 'v$NEXT_PATCH_VERSION' categories: - title: '🚀 Features' diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 3125024..b75fb58 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -18,22 +18,14 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Generate Release Notes + - name: Generate Release Notes and Publish id: generate_release_notes uses: release-drafter/release-drafter@v6 with: config-name: 'release-drafter.yml' + name: "Release ${{ github.ref_name }}" + tag: ${{ github.ref_name }} + publish: true + prerelease: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref_name }} - release_name: "Release ${{ github.ref_name }}" - body: ${{ steps.generate_release_notes.outputs.draft-body }} - draft: false - prerelease: false