Loading .gitlab-ci.yml +35 −4 Original line number Diff line number Diff line Loading @@ -11,7 +11,8 @@ stages: - build - test - document - publish - upload - release # Builds code and generates documentation build: Loading Loading @@ -70,9 +71,9 @@ test: # expire_in: 1 hour # when: on_success # publish release when commiting to master and the VERSION.txt file has changed publish: stage: publish # upload code to the web server when commiting to master and the VERSION.txt file has changed upload: stage: upload image: ubuntu:latest script: - export VERSION=$(grep -oP '^([^\s]*)' $DEPLOYMENT_INFO_VERSION_FILE) Loading @@ -92,3 +93,33 @@ publish: - if: '$CI_COMMIT_BRANCH' when: never # Make Gitlab release when a new version is uploaded: release: stage: release image: registry.gitlab.com/gitlab-org/release-cli:latest needs: - job: upload rules: - if: '$CI_COMMIT_BRANCH == "master"' changes: - VERSION.txt - if: '$CI_COMMIT_BRANCH' when: never script: - export VERSION=$(grep -oP '^([^\s]*)' $DEPLOYMENT_INFO_VERSION_FILE) - export TAG_MESSAGE=$(grep -oP '(?<=\s)[^\s].*' $DEPLOYMENT_INFO_VERSION_FILE) release: name: 'Release $VERSION' description: 'Created using the release-cli $TAG_MESSAGE' tag_name: '$VERSION' ref: '$VERSION' # milestones: assets: links: - name: 'Application' url: 'https://radek-oslejsek.cz/download/fidentis-analyst/FIDENTIS-Analyst-app-$VERSION.zip' - name: 'Data' url: 'https://radek-oslejsek.cz/download/fidentis-analyst/FIDENTIS-Analyst-data.zip' - name: 'Documentation' url: 'https://www.radek-oslejsek.cz/download/fidentis-analyst/apidocs/index.html' Loading
.gitlab-ci.yml +35 −4 Original line number Diff line number Diff line Loading @@ -11,7 +11,8 @@ stages: - build - test - document - publish - upload - release # Builds code and generates documentation build: Loading Loading @@ -70,9 +71,9 @@ test: # expire_in: 1 hour # when: on_success # publish release when commiting to master and the VERSION.txt file has changed publish: stage: publish # upload code to the web server when commiting to master and the VERSION.txt file has changed upload: stage: upload image: ubuntu:latest script: - export VERSION=$(grep -oP '^([^\s]*)' $DEPLOYMENT_INFO_VERSION_FILE) Loading @@ -92,3 +93,33 @@ publish: - if: '$CI_COMMIT_BRANCH' when: never # Make Gitlab release when a new version is uploaded: release: stage: release image: registry.gitlab.com/gitlab-org/release-cli:latest needs: - job: upload rules: - if: '$CI_COMMIT_BRANCH == "master"' changes: - VERSION.txt - if: '$CI_COMMIT_BRANCH' when: never script: - export VERSION=$(grep -oP '^([^\s]*)' $DEPLOYMENT_INFO_VERSION_FILE) - export TAG_MESSAGE=$(grep -oP '(?<=\s)[^\s].*' $DEPLOYMENT_INFO_VERSION_FILE) release: name: 'Release $VERSION' description: 'Created using the release-cli $TAG_MESSAGE' tag_name: '$VERSION' ref: '$VERSION' # milestones: assets: links: - name: 'Application' url: 'https://radek-oslejsek.cz/download/fidentis-analyst/FIDENTIS-Analyst-app-$VERSION.zip' - name: 'Data' url: 'https://radek-oslejsek.cz/download/fidentis-analyst/FIDENTIS-Analyst-data.zip' - name: 'Documentation' url: 'https://www.radek-oslejsek.cz/download/fidentis-analyst/apidocs/index.html'