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