stages:
  - build
  - test
  - release

build:
  stage: build
  script:
    - echo "TODO build pamhyr"

test:
  stage: test
  script:
    - echo "TODO PAMHYR tests"

nightly-linux-package:
  stage: release
  artifacts:
    paths:
      - packages/pamhyr-src.tar.gz
      - packages/pamhyr-gnulinux-amd64.tar.xz
  script:
    - cd packages
    - ./linux.sh
    - |
      curl --request POST \
        --header "PRIVATE-TOKEN: ${PRIVATE_TOKEN}" \
        --data name="pamhyr-gnulinux-amd64-nightly" \
        --data url="${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/packages/pamhyr-gnulinux-amd64.tar.xz" \
        --data direct_asset_path="/packages/pamhyr-gnulinux-amd64.tar.xz" \
        "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/releases/nightly/assets/links"
