Update .gitlab-ci.yml file
This commit is contained in:
parent
f79a5cfd65
commit
da2a73438a
1 changed files with 13 additions and 12 deletions
|
@ -11,17 +11,18 @@
|
|||
# https://hub.docker.com/r/library/rust/tags/
|
||||
image: "rust:latest"
|
||||
|
||||
# Optional: Pick zero or more services to be used on all builds.
|
||||
# Only needed when using a docker container to run your tests in.
|
||||
# Check out: https://docs.gitlab.com/ee/ci/services/index.html
|
||||
# services:
|
||||
# - mysql:latest
|
||||
# - redis:latest
|
||||
# - postgres:latest
|
||||
|
||||
# Use cargo to test the project
|
||||
test:cargo:
|
||||
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:
|
||||
- rustc --version && cargo --version # Print version info for debugging
|
||||
- cargo test --workspace --verbose
|
||||
- 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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue