From fc49d63921c60ca0a202652a38edd6f79ee7ed26 Mon Sep 17 00:00:00 2001 From: Ladislav Sulak Date: Tue, 28 May 2024 11:33:34 +0200 Subject: [PATCH 1/4] #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"}, From 1dfc91a116e728b08fc8e6ded94431b67c01a3ba Mon Sep 17 00:00:00 2001 From: Ladislav Sulak Date: Tue, 28 May 2024 11:37:53 +0200 Subject: [PATCH 2/4] Update release_draft.yml --- .github/workflows/release_draft.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_draft.yml b/.github/workflows/release_draft.yml index 006ef6790..2f43c6cbd 100644 --- a/.github/workflows/release_draft.yml +++ b/.github/workflows/release_draft.yml @@ -71,7 +71,7 @@ jobs: const ref = `refs/tags/${tag}`; const sha = context.sha; // The SHA of the commit to tag - const tagObject = await github.git.createTag({ + const tagObject = await github.rest.git.createTag({ owner: context.repo.owner, repo: context.repo.repo, tag: tag, From 69e235eef08542e27b6311202a8d39429f7abc64 Mon Sep 17 00:00:00 2001 From: Ladislav Sulak Date: Tue, 28 May 2024 11:40:25 +0200 Subject: [PATCH 3/4] Update release_draft.yml --- .github/workflows/release_draft.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release_draft.yml b/.github/workflows/release_draft.yml index 2f43c6cbd..05861c0c6 100644 --- a/.github/workflows/release_draft.yml +++ b/.github/workflows/release_draft.yml @@ -70,6 +70,7 @@ jobs: const tag = core.getInput('tag-name') const ref = `refs/tags/${tag}`; const sha = context.sha; // The SHA of the commit to tag + const tagMessage = 'Releasing new version'; const tagObject = await github.rest.git.createTag({ owner: context.repo.owner, From ca39b78ac3570472e62d209789e6d24b5839866c Mon Sep 17 00:00:00 2001 From: Ladislav Sulak Date: Tue, 28 May 2024 11:41:41 +0200 Subject: [PATCH 4/4] Update release_draft.yml --- .github/workflows/release_draft.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release_draft.yml b/.github/workflows/release_draft.yml index 05861c0c6..ae64538f2 100644 --- a/.github/workflows/release_draft.yml +++ b/.github/workflows/release_draft.yml @@ -81,6 +81,7 @@ jobs: type: 'commit', tagger: { name: context.actor, + email: `${context.actor}@users.noreply.github.com`, date: new Date().toISOString() } });