put tag name in the asset name

This commit is contained in:
Diego Fernando Carrión 2023-10-27 14:32:25 +02:00
parent 495703d2ca
commit 684551cdb3
No known key found for this signature in database
GPG Key ID: 811EF2E03998BFC4

View File

@ -29,7 +29,7 @@ variables:
DARWIN_ARM64_BINARY: "spry-darwin-arm64"
PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/myawesomerelease/${CI_COMMIT_TAG}"
build-job: # This job runs in the build stage, which runs first.
build:
stage: build
image: golang:1.21
script:
@ -53,13 +53,13 @@ upload:
- if: $CI_COMMIT_TAG
script:
- |
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${LINUX_AMD64_BINARY} ${PACKAGE_REGISTRY_URL}/${LINUX_AMD64_BINARY}
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${LINUX_AMD64_BINARY} ${PACKAGE_REGISTRY_URL}/${LINUX_AMD64_BINARY}-${CI_COMMIT_TAG}
- |
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${LINUX_ARM64_BINARY} ${PACKAGE_REGISTRY_URL}/${LINUX_ARM64_BINARY}
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${LINUX_ARM64_BINARY} ${PACKAGE_REGISTRY_URL}/${LINUX_ARM64_BINARY}-${CI_COMMIT_TAG}
- |
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${DARWIN_AMD64_BINARY} ${PACKAGE_REGISTRY_URL}/${DARWIN_AMD64_BINARY}
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${DARWIN_AMD64_BINARY} ${PACKAGE_REGISTRY_URL}/${DARWIN_AMD64_BINARY}-${CI_COMMIT_TAG}
- |
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${DARWIN_ARM64_BINARY} ${PACKAGE_REGISTRY_URL}/${DARWIN_ARM64_BINARY}
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${DARWIN_ARM64_BINARY} ${PACKAGE_REGISTRY_URL}/${DARWIN_ARM64_BINARY}-${CI_COMMIT_TAG}
release:
# Caution, as of 2021-02-02 these assets links require a login, see:
@ -71,8 +71,8 @@ release:
script:
- |
release-cli create --name "Release $CI_COMMIT_TAG" --tag-name $CI_COMMIT_TAG \
--assets-link "{\"name\":\"${LINUX_AMD64_BINARY}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${LINUX_AMD64_BINARY}\"}" \
--assets-link "{\"name\":\"${LINUX_AMD64_BINARY}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${LINUX_ARM64_BINARY}\"}" \
--assets-link "{\"name\":\"${DARWIN_AMD64_BINARY}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${DARWIN_AMD64_BINARY}\"}" \
--assets-link "{\"name\":\"${DARWIN_AMD64_BINARY}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${DARWIN_ARM64_BINARY}\"}"
--assets-link "{\"name\":\"${LINUX_AMD64_BINARY}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${LINUX_AMD64_BINARY}-${CI_COMMIT_TAG}\"}" \
--assets-link "{\"name\":\"${LINUX_AMD64_BINARY}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${LINUX_ARM64_BINARY}-${CI_COMMIT_TAG}\"}" \
--assets-link "{\"name\":\"${DARWIN_AMD64_BINARY}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${DARWIN_AMD64_BINARY}-${CI_COMMIT_TAG}\"}" \
--assets-link "{\"name\":\"${DARWIN_AMD64_BINARY}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${DARWIN_ARM64_BINARY}-${CI_COMMIT_TAG}\"}"