diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4f6306f..49eec33 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,6 +42,8 @@ build-bin: stage: build tags: - linux + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH script: - apt-get update - apt-get -y install libssl-dev pkg-config wget @@ -49,7 +51,7 @@ build-bin: - tar xzf sccache-v0.2.15-x86_64-unknown-linux-musl.tar.gz - mv sccache-v0.2.15-x86_64-unknown-linux-musl/sccache /usr/local/bin/sccache - chmod +x /usr/local/bin/sccache - - cargo build --release + - cargo build --releas - cd target/release - tar -czf ../../vade-linux-x64.tar.gz vade - cd ../../ @@ -67,18 +69,18 @@ build-docker: - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY - docker build -t $CI_REGISTRY/vade/vade-mecum . - docker push $CI_REGISTRY/vade/vade-mecum - # rules: - # - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH deploy-binaries: dependencies: - build-bin image: curlimages/curl:latest stage: deploy - # rules: - # - if: $CI_COMMIT_TAG + rules: + - if: $CI_COMMIT_TAG script: - - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ./vade-linux-x64.tar.gz "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/bin/0.1.0/vade-linux-x64-0.1.0.tar.gz"' + - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ./vade-linux-x64.tar.gz "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/bin/$CI_COMMIT_TAG/vade-linux-x64-$CI_COMMIT_TAG.tar.gz"' release: