| 1 | # GitLab-backup van de BlueGit tag-pipeline. Draait alleen op een tag. |
| 2 | # Minecraft-versie: bestand minecraft-version in de repo-root. |
| 3 | # Geen bump-commit, geen token-rotatie. |
| 4 | |
| 5 | workflow: |
| 6 | rules: |
| 7 | - if: $CI_COMMIT_TAG |
| 8 | |
| 9 | variables: |
| 10 | GIT_DEPTH: "0" |
| 11 | |
| 12 | stages: |
| 13 | - validate |
| 14 | - package |
| 15 | - release |
| 16 | |
| 17 | validate: |
| 18 | stage: validate |
| 19 | image: python:3 |
| 20 | script: |
| 21 | - bash scripts/ci/validate.sh |
| 22 | |
| 23 | package: |
| 24 | stage: package |
| 25 | image: python:3 |
| 26 | needs: [validate] |
| 27 | script: |
| 28 | - bash scripts/ci/pack.sh "$CI_COMMIT_TAG" |
| 29 | artifacts: |
| 30 | paths: |
| 31 | - build/out/*.zip |
| 32 | expire_in: 30 days |
| 33 | |
| 34 | release: |
| 35 | stage: release |
| 36 | image: registry.gitlab.com/gitlab-org/release-cli:latest |
| 37 | needs: |
| 38 | - job: package |
| 39 | artifacts: true |
| 40 | script: |
| 41 | - | |
| 42 | v="${CI_COMMIT_TAG#v}" |
| 43 | mc="$(tr -d '[:space:]' < minecraft-version)" |
| 44 | echo "Publishing GitLab Release for ${CI_COMMIT_TAG} (Death Firework ${v}, Minecraft ${mc})" |
| 45 | release: |
| 46 | name: "Death Firework $CI_COMMIT_TAG" |
| 47 | tag_name: "$CI_COMMIT_TAG" |
| 48 | description: "Release $CI_COMMIT_TAG of Death Firework for Minecraft 26.2." |
| 49 | assets: |
| 50 | links: [] |