Skip to content

Commit

Permalink
Add create tag when creating a release
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasjackson committed Feb 20, 2024
1 parent 5d688f9 commit 6976eb3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions github/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ func (m *Github) CreateRelease(
return fmt.Errorf("failed to create release: %w", err)
}

tagMessage := "Create new release"
_, _, err = client.Git.CreateTag(ctx, owner, repo, &github.Tag{
Tag: &tag,
SHA: &sha,
Message: &tagMessage,
})
if err != nil {
return fmt.Errorf("failed to create tag: %w", err)
}

log.Debug("Created release", "release", *rel.ID)

// if there are files to upload, upload them to the release
Expand Down

0 comments on commit 6976eb3

Please sign in to comment.