mirror of
https://gitgud.io/AsmodeusRex/rjw-race-support.git
synced 2024-08-15 00:03:24 +00:00
Enable GitLab CI
This commit is contained in:
parent
b7f19ab996
commit
ada2dd9e94
1 changed files with 38 additions and 0 deletions
38
.gitlab-ci.yml
Normal file
38
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,38 @@
|
|||
stages:
|
||||
- build
|
||||
- upload
|
||||
- release
|
||||
|
||||
variables:
|
||||
PACKAGE_NAME: "${CI_PROJECT_ID}-${CI_COMMIT_TAG}"
|
||||
PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/${CI_COMMIT_TAG}"
|
||||
|
||||
build:
|
||||
stage: build
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
script:
|
||||
- (cd generator; cargo run --locked)
|
||||
- zip -9r build About Content LoadFolders.xml ReadMe.md
|
||||
artifacts:
|
||||
paths:
|
||||
- build.zip
|
||||
|
||||
upload:
|
||||
stage: upload
|
||||
image: curlimages/curl:latest
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
script:
|
||||
- |
|
||||
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file build.zip "${PACKAGE_REGISTRY_URL}/${PACKAGE_NAME}"
|
||||
|
||||
release:
|
||||
stage: release
|
||||
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
script:
|
||||
- |
|
||||
release-cli create --name "Release $CI_COMMIT_TAG" --tag-name $CI_COMMIT_TAG \
|
||||
--assets-link "{\"name\":\"${PACKAGE_NAME}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${PACKAGE_NAME}"}"
|
Loading…
Reference in a new issue