Fika-Tarkov/mods/Better Keys NG/user/mods/flir-betterkeysng/.gitlab-ci.yml

34 lines
769 B
YAML

---
stages:
- build
- upload
build:
stage: build
image: node:22
artifacts:
paths:
- build
script:
- npm install
- npm run build
upload:
image: curlimages/curl:latest
stage: upload
cache:
key: tooling
paths:
- build
rules:
- if: '$CI_COMMIT_TAG'
script:
- |
OUTPUT_FILE=$(mktemp)
HTTP_CODE=$(curl --silent --output $OUTPUT_FILE --write-out "%{http_code}" --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/flir-betterkeysng.zip "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/betterkeys-ng/${CI_COMMIT_TAG}/flir-betterkeysng.zip")
echo "return $HTTP_CODE"
cat $OUTPUT_FILE
if [[ ${HTTP_CODE} -lt 200 || ${HTTP_CODE} -gt 299 ]] ; then
exit 1
fi