Skip to content

Commit

Permalink
#201: creation of annotated git tag
Browse files Browse the repository at this point in the history
  • Loading branch information
lsulak committed May 28, 2024
1 parent 6e01b73 commit e94bdbd
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/release_draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down

0 comments on commit e94bdbd

Please sign in to comment.