diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a27da65..2a39d57 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,14 @@ stages: - build - release +build:test: + stage: build + image: rust:latest + script: + - echo 'running release_job' + - echo 'Previous Job ID is printed below' + - echo $CI_JOB_ID + build:linux-gnu-amd64: stage: build image: rust:latest @@ -68,22 +76,16 @@ rustdoc: paths: - target/doc -#release_job: -# stage: release -# image: registry.gitlab.com/gitlab-org/release-cli:latest -# rules: -# - if: $CI_COMMIT_TAG # Run this job when a tag is created -# script: -# - echo "running release_job" -# release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties -# tag_name: "$CI_COMMIT_TAG" -# description: "$CI_COMMIT_TAG" -# assets: -# links: -# - name: "rua-list-x86_64-unknown-linux-gnu-$CI_COMMIT_TAG" -# url: "https://git.rua.plus/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/cw/-/jobs/${CI_JOB_ID}/artifacts/file/public/rua-list-x86_64-unknown-linux-gnu-$CI_COMMIT_TAG" -# - name: "rua-list-x86_64-unknown-linux-musl-$CI_COMMIT_TAG" -# url: "https://git.rua.plus/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/cw/-/jobs/${CI_JOB_ID}/artifacts/file/public/rua-list-x86_64-unknown-linux-musl-$CI_COMMIT_TAG" -# - name: "ua-list-x86_64-pc-windows-gnu-$CI_COMMIT_TAG.exe" -# url: "https://git.rua.plus/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/cw/-/jobs/${CI_JOB_ID}/artifacts/file/public/ua-list-x86_64-pc-windows-gnu-$CI_COMMIT_TAG.exe" - +release_job: + stage: release + image: registry.gitlab.com/gitlab-org/release-cli:latest + rules: + - if: $CI_COMMIT_TAG # Run this job when a tag is created + script: + - > + release-cli create --name release-branch-$CI_JOB_ID + # --description release-branch-$CI_COMMIT_REF_NAME-$CI_JOB_ID + --tag-name job-$CI_JOB_ID --ref $CI_COMMIT_SHA + --assets-link '{"name":"rua-list-x86_64-unknown-linux-gnu-$CI_COMMIT_TAG","url":"https://git.rua.plus/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/cw/-/jobs/${CI_JOB_ID}/artifacts/file/public/rua-list-x86_64-unknown-linux-gnu-$CI_COMMIT_TAG","link_type":"other","filepath":"xzy"}' + --assets-link '{"name":"rua-list-x86_64-unknown-linux-musl-$CI_COMMIT_TAG","url":"https://git.rua.plus/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/cw/-/jobs/${CI_JOB_ID}/artifacts/file/public/rua-list-x86_64-unknown-linux-musl-$CI_COMMIT_TAG","link_type":"other","filepath":"xzy"}' + --assets-link '{"name":"rua-list-x86_64-pc-windows-gnu-$CI_COMMIT_TAG.exe","url":"https://git.rua.plus/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/cw/-/jobs/${CI_JOB_ID}/artifacts/file/public/ua-list-x86_64-pc-windows-gnu-$CI_COMMIT_TAG.exe","link_type":"other","filepath":"xzy"}' \ No newline at end of file