This repository has been archived on 2025-07-31. You can view files and clone it, but cannot push or open issues or pull requests.
Files
caldwell-59/.gitlab-ci.yml
Nikolaos Karaolidis 7f53d88f50 Add text variant
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
2024-09-11 23:04:32 +03:00

64 lines
1.1 KiB
YAML

stages:
- test
- build
- release
cache: &global_cache
key:
files:
- package.json
- yarn.lock
paths:
- node_modules
policy: pull-push
test:
image: node:20
stage: test
cache:
<<: *global_cache
before_script:
- yarn
script:
- yarn test
build:
image: node:20
stage: build
cache:
<<: *global_cache
before_script:
- yarn
script:
- yarn zip
after_script:
- echo "JOB_ID=$CI_JOB_ID" >> job.env
artifacts:
paths:
- dist/caldwell-59.zip
expire_in: 1d
reports:
dotenv: job.env
release:
image: registry.gitlab.com/gitlab-org/release-cli
stage: release
cache:
<<: *global_cache
needs:
- job: build
artifacts: true
script:
- echo "Create Release $CI_COMMIT_REF_NAME"
release:
name: "Release $CI_COMMIT_REF_NAME"
tag_name: "$CI_COMMIT_REF_NAME"
ref: "$CI_COMMIT_REF_NAME"
description: "Release $CI_COMMIT_REF_NAME"
assets:
links:
- name: "caldwell-59.zip"
url: "https://git.karaolidis.com/karaolidis/caldwell-59/-/jobs/$JOB_ID/artifacts/raw/caldwell-59.zip"
only:
- tags