Update .gitlab-ci.yml file
This commit is contained in:
parent
a1b62e0eb0
commit
1d3711c0af
@ -39,13 +39,6 @@ release:
|
||||
# Install Gulp globally
|
||||
- npm install --global gulp-cli
|
||||
- gulp --version # Verify Gulp is installed
|
||||
# Install release-cli
|
||||
- |
|
||||
RELEASE_CLI_VERSION="v0.18.0" # Replace with the latest version
|
||||
curl -sSL "https://gitlab.com/gitlab-org/release-cli/-/releases/${RELEASE_CLI_VERSION}/downloads/release-cli-linux-amd64.tar.gz" -o release-cli-linux-amd64.tar.gz
|
||||
tar -xzvf release-cli-linux-amd64.tar.gz
|
||||
mv linux-amd64 /usr/local/bin/release-cli
|
||||
chmod +x /usr/local/bin/release-cli
|
||||
# Verify release-cli installation
|
||||
- release-cli --version
|
||||
- git fetch --all
|
||||
@ -73,6 +66,25 @@ release:
|
||||
- git commit -m "Update system.json with release URL"
|
||||
- git push "https://$CI_COMMITTER_USER_AND_TOKEN@gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}.git" HEAD:master
|
||||
|
||||
# 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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}' "https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/releases")
|
||||
# Publish the release to the Foundry API
|
||||
- |
|
||||
curl -X POST https://api.foundryvtt.com/_api/packages/release_version/ \
|
||||
|
Loading…
x
Reference in New Issue
Block a user