variables: PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/scim" EXTRA_DESCRIPTION: "" SCIM_FILE: scim_${CI_COMMIT_TAG}.zip SCIM_PACKAGE: ${PACKAGE_REGISTRY_URL}/${CI_COMMIT_TAG}/scim.zip stages: - package - upload - release package: stage: package image: node:17 rules: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - if: $CI_COMMIT_TAG script: - npm ci - npm run package artifacts: paths: - dist/ upload: stage: upload image: curlimages/curl rules: - if: $CI_COMMIT_TAG script: - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file "dist/${SCIM_FILE}" "${SCIM_PACKAGE}"' needs: - job: package artifacts: true release_job: stage: release image: registry.gitlab.com/gitlab-org/release-cli:latest rules: - if: $CI_COMMIT_TAG script: - echo "running release_job" release: name: "v${CI_COMMIT_TAG}" description: "Created using the release-cli $EXTRA_DESCRIPTION" tag_name: "$CI_COMMIT_TAG" ref: "$CI_COMMIT_TAG" assets: links: - name: "scim" url: "${SCIM_PACKAGE}" filepath: "/scim" link_type: "package"