Skip to content
Snippets Groups Projects
Commit d92a77a9 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 #35776 failed
...@@ -9,7 +9,7 @@ stages: ...@@ -9,7 +9,7 @@ stages:
build: build:
stage: build stage: build
# image used for this build # image used for this build
image: rust image: registry.gitlab.com/gitlab-org/release-cli:latest
# build script # build script
script: script:
- cargo build --release - cargo build --release
...@@ -25,19 +25,22 @@ build: ...@@ -25,19 +25,22 @@ 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: rust
script: script:
- echo "Creating a release..." - echo "Creating a release..."
- CI_COMMIT_TAG="0.2.2"
- 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 +49,8 @@ release: ...@@ -46,8 +49,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