Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nheko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
nheko
Commits
f3966bd1
Verified
Commit
f3966bd1
authored
2 years ago
by
Joe Donofry
Browse files
Options
Downloads
Patches
Plain Diff
Generate release notes from CHANGELOG.md
parent
62dd85ab
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#4423
canceled
2 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.ci/update-github-release.sh
+2
-1
2 additions, 1 deletion
.ci/update-github-release.sh
.gitlab-ci.yml
+1
-1
1 addition, 1 deletion
.gitlab-ci.yml
with
3 additions
and
2 deletions
.ci/update-github-release.sh
+
2
−
1
View file @
f3966bd1
...
...
@@ -18,6 +18,7 @@ http_code=$(curl \
"https://api.github.com/repos/Nheko-Reborn/nheko/releases/tags/
$CI_COMMIT_TAG
"
)
if
[
"
$http_code
"
=
"404"
]
;
then
release_notes
=
"
$(
perl
-0777
-ne
'/.*?(## .*?)\n(## |\Z)/s && print $1'
CHANGELOG.md | jq
-R
-s
'.'
)
"
# Doing a 'fresh' release, not just updating the assets.
release_json
=
"
$(
curl
\
-X
POST
\
...
...
@@ -25,7 +26,7 @@ if [ "$http_code" = "404" ]; then
-H
"Authorization: Bearer
${
GITHUB_AUTH_TOKEN
}
"
\
-H
"X-GitHub-Api-Version: 2022-11-28"
\
https://api.github.com/repos/Nheko-Reborn/nheko/releases
\
-d
"{
\"
tag_name
\"
:
\"
${
CI_COMMIT_TAG
}
\"
,
\"
target_commitish
\"
:
\"
master
\"
,
\"
name
\"
:
\"
${
CI_COMMIT_TAG
}
\"
,
\"
body
\"
:
\"
Description of the release
\"
,
\"
draft
\"
:true,
\"
prerelease
\"
:true,
\"
generate_release_notes
\"
:false}"
)
"
-d
"{
\"
tag_name
\"
:
\"
${
CI_COMMIT_TAG
}
\"
,
\"
target_commitish
\"
:
\"
master
\"
,
\"
name
\"
:
\"
${
CI_COMMIT_TAG
}
\"
,
\"
body
\"
:
\"
${
release_notes
}
\"
,
\"
draft
\"
:true,
\"
prerelease
\"
:true,
\"
generate_release_notes
\"
:false}"
)
"
elif
[
"
$http_code
"
=
"200"
]
;
then
# Updating a release (probably because of cirrus-ci or so)
release_json
=
$(
curl
\
...
...
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
1
−
1
View file @
f3966bd1
...
...
@@ -317,4 +317,4 @@ github-release:
before_script
:
-
apk update && apk add jq
script
:
-
./.ci/update-github-release.sh
\ No newline at end of file
-
./.ci/update-github-release.sh
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment