https://github.com/petermekhaeil/git-tag-release
How to create a GitHub release on tag push
https://github.com/petermekhaeil/git-tag-release
github release tag
Last synced: about 1 month ago
JSON representation
How to create a GitHub release on tag push
- Host: GitHub
- URL: https://github.com/petermekhaeil/git-tag-release
- Owner: petermekhaeil
- Created: 2023-01-07T12:33:10.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T13:39:49.000Z (over 3 years ago)
- Last Synced: 2025-10-14T05:22:56.671Z (8 months ago)
- Topics: github, release, tag
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# git-tag-release
The different ways of creating a GitHub release.
[GitHub Documentation](https://docs.github.com/en/rest/releases/releases#create-a-release)
## Using cURL
```bash
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer "\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/OWNER/REPO/releases \
-d '{"tag_name":"v0.0.0","name":"v0.0.0","body":"Full Changelog: https://github.com/OWNER/REPO/commits/v0.0.0"}'
```
## Using JavaScript
```js
const octokit = new Octokit({
auth: 'YOUR-TOKEN'
});
await octokit.request('POST /repos/{owner}/{repo}/releases', {
owner: 'OWNER',
repo: 'REPO',
tag_name: 'v0.0.0',
name: 'v0.0.0',
body: 'Full Changelog: https://github.com/OWNER/REPO/commits/v0.0.0'
});
```
## Using GitHub CLI
```bash
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
/repos/OWNER/REPO/releases \
-f tag_name='v0.0.0' \
-f name='v0.0.0' \
-f body='Full Changelog: https://github.com/OWNER/REPO/commits/v0.0.0'
```