Commit 7b89c1cf authored by GridexX's avatar GridexX
Browse files

feat(semantic_release): expose RELEASE_VERSION artifact



Signed-off-by: default avatarGridexX <arsene582@gmail.com>
parent 45dddc27
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
# Changelog
All notable changes to this job will be documented in this file.

## [1.1.0] - 2023-04-14
* Export `RELEASE_VERSION` variable to be used in next jobs.

## [1.0.1] - 2023-02-28
* Fix broken documentation links

+1 −0
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ job will always try to be as fast as possible! 🚀

This job will expose an artifact will the result from `semantic-release` and is exposed as `semantic-release logs`,
it is also available directly in the job's logs.
It also exposes the `RELEASE_VERSION` variable, containing the version number of the release. This variable can be used in next jobs.

## Author
This resource is an **[official job](https://docs.r2devops.io/get-started/faq/#use-a-template)** added in [**R2Devops repository**](https://gitlab.com/r2devops/hub) by [@moha-s](https://gitlab.com/moha-s)
+4 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ semantic_release:
    - fi

    - npx semantic-release $SEMANTIC_ADDITIONAL_OPTIONS | tee -a semantic-output.log
    - echo RELEASE_VERSION="$(git describe --tags --abbrev=0)" > release_version.env
  rules:
    - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
  cache:
@@ -55,3 +56,6 @@ semantic_release:
    expose_as: "semantic-release logs"
    paths:
      - semantic-output.log
    reports:
      dotenv: release_version.env