Files
weapon-project-extended/.gitlab-ci.yml
2023-08-28 19:44:10 +00:00

52 lines
1.1 KiB
YAML

stages:
- prepare # List of stages for jobs, and their order of execution
- release
prepare_job:
stage: prepare
image: python:3.10
script:
- 'pip install requests'
- mkdir WPE-2 && mv data WPE-2/ && mv modinfo.lua WPE-2/ && mv thumb.png WPE-2/
- 'git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gl.beaconborn.ru/bacon/translation-generator.git'
- 'python3 translation-generator/main.py $CI_PROJECT_DIR/WPE-2/data/'
- 'cd WPE-2 && zip -r * WPE-2.0_$CI_PIPELINE_IID.zip'
- 'ls -al'
artifacts:
name: "WPE-2.0_$CI_PIPELINE_IID"
paths:
- WPE-2/
needs:
dependencies:
- prepare_job
stage: release # It only runs when *both* jobs in the test stage complete successfully.
image: registry.gitlab.com/gitlab-org/release-cli:latest
only:
# - if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"
refs:
- test
- ^tags
changes:
- data/**/*
- modinfo.lua
- thumb.png
script:
- echo "Release WPE 2.0_$CI_COMMIT_SHORT_SHA"
release:
tag_name: v2.0.$CI_PIPELINE_IID
name: 'WPE 2.0_$CI_COMMIT_SHORT_SHA'
description: '$CI_COMMIT_MESSAGE'