ci: use link_type other for release

This commit is contained in:
Price Hiller 2023-09-13 20:49:47 -05:00
parent 60d4750a5e
commit 8723a7b5dd
No known key found for this signature in database

View File

@ -20,8 +20,6 @@ build:
artifacts:
paths:
- "${RESUME_FILE}"
upload:
stage: upload
needs:
@ -31,7 +29,6 @@ upload:
image: curlimages/curl:latest
script:
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file "${RESUME_FILE}" ${PACKAGE_REGISTRY_URL}/${CI_COMMIT_TAG}/${RESUME_FILE}'
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file "${RESUME_FILE}" ${PACKAGE_REGISTRY_URL}/latest/${RESUME_FILE}'
tag-release:
stage: release
@ -50,32 +47,5 @@ tag-release:
links:
- name: "${RESUME_FILE}"
url: "${PACKAGE_REGISTRY_URL}/${CI_COMMIT_TAG}/${RESUME_FILE}"
remove-latest-release:
stage: release
needs:
- upload
image: curlimages/curl:latest
rules:
- if: $CI_COMMIT_TAG
script:
- echo "Removing current latest tag"
- 'curl --request DELETE --header "JOB-TOKEN: ${CI_JOB_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/releases/latest"'
latest-release:
stage: release
needs:
- remove-latest-release
image: registry.gitlab.com/gitlab-org/release-cli:latest
script:
- echo "Releasing Resume @ latest"
rules:
- if: $CI_COMMIT_TAG
release:
tag_name: latest
description: latest
ref: "${CI_COMMIT_SHA}"
assets:
links:
- name: "${RESUME_FILE}"
url: "${PACKAGE_REGISTRY_URL}/latest/${RESUME_FILE}"
filepath: /resume.pdf
link_type: other