d
This commit is contained in:
@@ -56,11 +56,21 @@ create-release:
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
script:
|
||||
- echo "Creating release..."
|
||||
- >
|
||||
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" \
|
||||
--upload-file "build/bin/$PROJECT_NAME-v$PROJECT_VERSION-win-$ARCH_TYPE.zip" \
|
||||
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/releases/v$PROJECT_VERSION/$PROJECT_NAME-v$PROJECT_VERSION-win-$ARCH_TYPE.zip"
|
||||
- Write-Host "Creating release..."
|
||||
- Write-Host "当前工作目录: $(Get-Location)"
|
||||
- Write-Host "文件列表:"
|
||||
- Get-ChildItem -Recurse -Filter "*.zip" | Format-Table FullName, Length
|
||||
- $zipFile = $zipFiles[0].FullName
|
||||
- Write-Host "将上传的文件: $zipFile"
|
||||
|
||||
# 4. 上传到 GitLab Package Registry
|
||||
- $uploadUrl = "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/releases/v$PROJECT_VERSION/$(Split-Path $zipFile -Leaf)"
|
||||
- Write-Host "上传到: $uploadUrl"
|
||||
|
||||
- curl --fail --show-error --location `
|
||||
--header "JOB-TOKEN: $CI_JOB_TOKEN" `
|
||||
--upload-file "$zipFile" `
|
||||
"$uploadUrl"
|
||||
release:
|
||||
tag_name: $RELEASE_TAG
|
||||
name: $RELEASE_NAME
|
||||
|
||||
Reference in New Issue
Block a user