From 853b3db4323775a54084fd2b7d199a083115e1ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=AA=20Ng=E1=BB=8Dc=20Hoa?= <114990730+h2oa@users.noreply.github.com> Date: Thu, 9 May 2024 10:28:17 +0700 Subject: [PATCH 1/2] Update release.yml --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 447843150..d808f3c93 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,10 +30,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - env: + HEAD_REF: ${{ github.head_ref }} - run: > gh release create --target ${{ github.event.pull_request.merge_commit_sha }} {--title=CML\ - ,}$(basename ${{ github.head_ref }}) --generate-notes --draft + ,}$(basename $HEAD_REF) --generate-notes --draft env: GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }} package: From 35cfca563ee885ff520226cf50f69891a41fc255 Mon Sep 17 00:00:00 2001 From: Helio Machado <0x2b3bfa0+git@googlemail.com> Date: Thu, 9 May 2024 23:39:45 +0200 Subject: [PATCH 2/2] Apply suggestions from code review --- .github/workflows/release.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d808f3c93..1dff6a100 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,12 +30,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - env: - HEAD_REF: ${{ github.head_ref }} - run: > gh release create --target ${{ github.event.pull_request.merge_commit_sha }} {--title=CML\ - ,}$(basename $HEAD_REF) --generate-notes --draft + ,}"$(basename "$GITHUB_HEAD_REF")" --generate-notes --draft env: GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }} package: