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
a3eb7157
Unverified
Commit
a3eb7157
authored
Feb 22, 2024
by
Loan J
Committed by
GitHub
Feb 22, 2024
Browse files
Update build-release.yml
parent
c89c27d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
.github/workflows/build-release.yml
.github/workflows/build-release.yml
+13
-6
No files found.
.github/workflows/build-release.yml
View file @
a3eb7157
...
@@ -13,11 +13,18 @@ jobs:
...
@@ -13,11 +13,18 @@ jobs:
-
name
:
Checkout repository
-
name
:
Checkout repository
uses
:
actions/checkout@v2
uses
:
actions/checkout@v2
-
name
:
Get commit hash
-
name
:
Check for changes in package.json
id
:
get_hash
run
:
|
run
:
|
HASH=$(git rev-parse --short "$GITHUB_SHA")
git diff --cached --diff-filter=d package.json || {
echo "::set-output name=hash::$HASH"
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
:
Create GitHub release
-
name
:
Create GitHub release
uses
:
actions/github-script@v5
uses
:
actions/github-script@v5
...
@@ -27,8 +34,8 @@ jobs:
...
@@ -27,8 +34,8 @@ jobs:
const release = await github.rest.repos.createRelease({
const release = await github.rest.repos.createRelease({
owner: context.repo.owner,
owner: context.repo.owner,
repo: context.repo.repo,
repo: context.repo.repo,
tag_name: `v${{ steps.get_
hash
.outputs.
hash
}}`,
tag_name: `v${{ steps.get_
version
.outputs.
version
}}`,
name: `v${{ steps.get_
hash
.outputs.
hash
}}`,
name: `v${{ steps.get_
version
.outputs.
version
}}`,
body: 'Automatically created new release',
body: 'Automatically created new release',
})
})
console.log(`Created release ${release.data.html_url}`)
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