Update GitLab CI configuration
Add deploy stage for crates.io
This commit is contained in:
parent
60c7f4762f
commit
95ab885fb4
|
@ -1,3 +1,9 @@
|
||||||
|
image: "rust:latest"
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- test
|
||||||
|
- deploy
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
CARGO_HOME: $CI_PROJECT_DIR/.cargo
|
CARGO_HOME: $CI_PROJECT_DIR/.cargo
|
||||||
|
|
||||||
|
@ -12,9 +18,21 @@ variables:
|
||||||
.test_job: &test_job
|
.test_job: &test_job
|
||||||
<<: *cached
|
<<: *cached
|
||||||
environment: test
|
environment: test
|
||||||
|
stage: test
|
||||||
|
|
||||||
test:rust_1_25_0:
|
.deploy_job: &deploy_job
|
||||||
|
<<: *cached
|
||||||
|
environment: deploy
|
||||||
|
stage: deploy
|
||||||
|
|
||||||
|
test:rust-stable:
|
||||||
<<: *test_job
|
<<: *test_job
|
||||||
image: "rust:1.25.0"
|
|
||||||
script:
|
script:
|
||||||
- cargo test --all
|
- cargo test --all
|
||||||
|
|
||||||
|
deploy:crates-io:
|
||||||
|
<<: *deploy_job
|
||||||
|
script:
|
||||||
|
- cargo publish --token $CRATES_IO_API_TOKEN
|
||||||
|
only:
|
||||||
|
- tags@valeth/discord-rpc-client.rs
|
||||||
|
|
Loading…
Reference in New Issue