28 lines
1.4 KiB
YAML
28 lines
1.4 KiB
YAML
# This file is a template, and might need editing before it works on your project.
|
|
# You can copy and paste this template into a new `.gitlab-ci.yml` file.
|
|
# You should not add this template to an existing `.gitlab-ci.yml` file by using the `include:` keyword.
|
|
#
|
|
# To contribute improvements to CI/CD templates, please follow the Development guide at:
|
|
# https://docs.gitlab.com/ee/development/cicd/templates.html
|
|
# This specific template is located at:
|
|
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Rust.gitlab-ci.yml
|
|
|
|
# Official language image. Look for the different tagged releases at:
|
|
# https://hub.docker.com/r/library/rust/tags/
|
|
image: "rust:latest"
|
|
|
|
release_job:
|
|
stage: build
|
|
image: "rust:latest"
|
|
rules:
|
|
- if: $CI_COMMIT_TAG
|
|
when: never # Do not run this job when a tag is created manually
|
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch
|
|
script:
|
|
- echo "running release_job for $TAG"
|
|
- cargo build --release
|
|
release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties
|
|
tag_name: 'v0.$CI_PIPELINE_IID' # The version is incremented per pipeline.
|
|
description: 'v0.$CI_PIPELINE_IID'
|
|
ref: '$CI_COMMIT_SHA' # The tag is created from the pipeline SHA.
|
|
|