Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
2111398d
Unverified
Commit
2111398d
authored
Mar 06, 2024
by
Timothy Jaeryang Baek
Committed by
GitHub
Mar 06, 2024
Browse files
Merge pull request #1048 from jannikstdl/release-notes
feat: show latest changes in releases
parents
3455f899
95b20f3c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
.github/workflows/build-release.yml
.github/workflows/build-release.yml
+12
-2
No files found.
.github/workflows/build-release.yml
View file @
2111398d
...
...
@@ -19,24 +19,34 @@ jobs:
echo "No changes to package.json"
exit 1
}
-
name
:
Get version number from package.json
id
:
get_version
run
:
|
VERSION=$(jq -r '.version' package.json)
echo "::set-output name=version::$VERSION"
-
name
:
Extract latest CHANGELOG entry
id
:
changelog
run
:
|
CHANGELOG_CONTENT=$(awk '/^## \[/{n++} n==1' CHANGELOG.md)
echo "CHANGELOG_CONTENT<<EOF"
echo "$CHANGELOG_CONTENT"
echo "EOF"
echo "::set-output name=content::${CHANGELOG_CONTENT}"
-
name
:
Create GitHub release
uses
:
actions/github-script@v5
with
:
github-token
:
${{ secrets.GITHUB_TOKEN }}
script
:
|
const changelog = `${{ steps.changelog.outputs.content }}`;
const release = await github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: `v${{ steps.get_version.outputs.version }}`,
name: `v${{ steps.get_version.outputs.version }}`,
body:
'Automatically created new release'
,
body:
changelog
,
})
console.log(`Created release ${release.data.html_url}`)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment