From fc49d63921c60ca0a202652a38edd6f79ee7ed26 Mon Sep 17 00:00:00 2001 From: Ladislav Sulak Date: Tue, 28 May 2024 11:33:34 +0200 Subject: [PATCH] #201: tag was missing from release notes generator (#202) * #201: tag was missing from release notes generator * #201: creation of annotated git tag --- .github/workflows/release_draft.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release_draft.yml b/.github/workflows/release_draft.yml index 7421f25b1..006ef6790 100644 --- a/.github/workflows/release_draft.yml +++ b/.github/workflows/release_draft.yml @@ -71,11 +71,24 @@ jobs: const ref = `refs/tags/${tag}`; const sha = context.sha; // The SHA of the commit to tag + const tagObject = await github.git.createTag({ + owner: context.repo.owner, + repo: context.repo.repo, + tag: tag, + message: tagMessage, + object: sha, + type: 'commit', + tagger: { + name: context.actor, + date: new Date().toISOString() + } + }); + await github.rest.git.createRef({ owner: context.repo.owner, repo: context.repo.repo, ref: ref, - sha: sha + sha: tagObject.data.sha }); console.log(`Tag created: ${tag}`); @@ -96,6 +109,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: + tag-name: ${{ github.event.inputs.tagName }} chapters: | [ {"title": "Breaking Changes 💥", "label": "breaking-change"},