Skip to content
Snippets Groups Projects
Commit 8fc8c0e8 authored by poka's avatar poka
Browse files

WIP: test

parent de184b29
No related branches found
No related tags found
No related merge requests found
Pipeline #35790 failed
This commit is part of merge request !19. Comments created here will be created in the context of that merge request.
...@@ -25,19 +25,23 @@ build: ...@@ -25,19 +25,23 @@ build:
paths: paths:
- target/release - target/release
# only build gcli when adding a tag # only build gcli when adding a tag
only: # only:
- tags # - tags
release: release:
stage: release stage: release
image: rust image: registry.gitlab.com/gitlab-org/release-cli:latest
script: script:
- echo "Creating a release..." - echo "Creating a release..."
- CI_COMMIT_TAG="0.2.2"
- apt-get update && apt-get install -y git
- LAST_VERSION="$(git describe --tags --abbrev=0)"
- RELEASE_DESCRIPTION="$(git log --pretty='format:- %s ([%h]($CI_PROJECT_URL/-/commit/%h)) ' HEAD...$LAST_VERSION --reverse)"
# Define release parameters # Define release parameters
release: release:
# Release name and description using the tag name # Release name and description using the tag name
name: "Release $CI_COMMIT_TAG" name: "v$CI_COMMIT_TAG"
description: "Automatically created release for v$CI_COMMIT_TAG" description: "Latest changes:\n$RELEASE_DESCRIPTION"
# Set the tag for the release # Set the tag for the release
tag_name: "$CI_COMMIT_TAG" tag_name: "$CI_COMMIT_TAG"
# Attach the artifact to the release # Attach the artifact to the release
...@@ -46,8 +50,8 @@ release: ...@@ -46,8 +50,8 @@ release:
- name: "gcli v$CI_COMMIT_TAG for Linux" - name: "gcli v$CI_COMMIT_TAG for Linux"
url: "$CI_PROJECT_URL/-/jobs/artifacts/$CI_COMMIT_TAG/raw/target/release/gcli?job=build" url: "$CI_PROJECT_URL/-/jobs/artifacts/$CI_COMMIT_TAG/raw/target/release/gcli?job=build"
# Trigger release creation only for tagged commits # Trigger release creation only for tagged commits
only: # only:
- tags # - tags
# Not necessary but clearly shows the dependency # Not necessary but clearly shows the dependency
dependencies: dependencies:
- build - build
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment