forked from oscar.krause/fastapi-dls
.gitlab-ci.yml - fixed release job
This commit is contained in:
parent
18e9ab2ebf
commit
01fe142850
@ -267,20 +267,31 @@ deploy:pacman:
|
|||||||
- 'echo "EXPORT_NAME: ${EXPORT_NAME}"'
|
- 'echo "EXPORT_NAME: ${EXPORT_NAME}"'
|
||||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ${EXPORT_NAME} "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${PACKAGE_NAME}/${PACKAGE_VERSION}/${EXPORT_NAME}"'
|
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ${EXPORT_NAME} "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${PACKAGE_NAME}/${PACKAGE_VERSION}/${EXPORT_NAME}"'
|
||||||
|
|
||||||
release:
|
release:prepare:
|
||||||
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
stage: .pre
|
||||||
stage: .post
|
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_TAG
|
- if: $CI_COMMIT_TAG
|
||||||
when: never
|
when: never
|
||||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||||
before_script:
|
script:
|
||||||
- set -a # make variables from "source" command available to release-cli
|
|
||||||
- source version.env
|
- source version.env
|
||||||
|
- echo &VERSION
|
||||||
|
artifacts:
|
||||||
|
reports:
|
||||||
|
dotenv: version.env
|
||||||
|
|
||||||
|
release:
|
||||||
|
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||||
|
stage: .post
|
||||||
|
needs:
|
||||||
|
- job: release:prepare
|
||||||
|
artifacts: true
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_TAG
|
||||||
|
when: never
|
||||||
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||||
script:
|
script:
|
||||||
- echo "Running release-job for $VERSION"
|
- echo "Running release-job for $VERSION"
|
||||||
after_script:
|
|
||||||
- set +a
|
|
||||||
release:
|
release:
|
||||||
name: $CI_PROJECT_TITLE $version
|
name: $CI_PROJECT_TITLE $version
|
||||||
description: Release of $CI_PROJECT_TITLE version $VERSION
|
description: Release of $CI_PROJECT_TITLE version $VERSION
|
||||||
|
Loading…
Reference in New Issue
Block a user