Update .gitlab-ci.yml file
This commit is contained in:
parent
1619c9fb01
commit
e1097fffc1
@ -24,7 +24,7 @@ compile:
|
||||
# Release Job (manually triggered with version)
|
||||
release:
|
||||
stage: release
|
||||
image: ubuntu:latest # Or any other basic image
|
||||
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||
before_script:
|
||||
# Install Node.js v21.7.3 manually
|
||||
- apt-get update && apt-get install -y curl jq git openssh-client
|
||||
@ -52,26 +52,25 @@ release:
|
||||
- gulp release
|
||||
|
||||
# Create a release on GitLab
|
||||
- |
|
||||
export RELEASE_RESPONSE=$(curl --request POST \
|
||||
--header "PRIVATE-TOKEN: ${GITLAB_PAT}" \
|
||||
--header "Content-Type: application/json" \
|
||||
--data '{
|
||||
"name": "Release v'$VERSION'",
|
||||
"tag_name": "v'$VERSION'",
|
||||
"description": "Release v'$VERSION'",
|
||||
"ref": "master",
|
||||
"assets": {
|
||||
"links": [
|
||||
{
|
||||
"name": "Download kidsonbrooms.zip",
|
||||
"url": "https://gitlab.com/wintermyst/kidsonbrooms/-/jobs/$CI_JOB_ID/artifacts/download"
|
||||
}
|
||||
]
|
||||
- >
|
||||
curl --request POST \
|
||||
--header "PRIVATE-TOKEN: ${GITLAB_PAT}" \
|
||||
--header "Content-Type: application/json" \
|
||||
--data "{
|
||||
\"name\": \"Release v$VERSION\",
|
||||
\"tag_name\": \"v$VERSION\",
|
||||
\"description\": \"Release v$VERSION\",
|
||||
\"ref\": \"master\",
|
||||
\"assets\": {
|
||||
\"links\": [
|
||||
{
|
||||
\"name\": \"Download kidsonbrooms.zip\",
|
||||
\"url\": \"https://gitlab.com/wintermyst/kidsonbrooms/-/jobs/$CI_JOB_ID/artifacts/download\"
|
||||
}
|
||||
}' "https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/releases")
|
||||
|
||||
# Get the release URL from the response
|
||||
]
|
||||
}
|
||||
}" "https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/releases"
|
||||
# Update system.json
|
||||
- export RELEASE_URL=$(echo $RELEASE_RESPONSE | jq -r '.assets.links[0].url')
|
||||
|
||||
# Update the system.json file with the release URL
|
||||
|
Loading…
Reference in New Issue
Block a user