workflow:
  rules:
    - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
    - when: never

build_release_fixture:
  image: python@sha256:f77ac9e44ae96ef2c90b8053ea08c31f8be030f824196b0ae4db6d462c84e51f
  tags:
    - saas-linux-small-amd64
  script:
    - mkdir -p dist
    - python3 build_fixture.py --version-file version.txt --output dist/release.pyz
    - >-
      python3 release_tools.py manifest
      --artifact dist/release.pyz
      --builder build_fixture.py
      --ci-file .gitlab-ci.yml
      --version-file version.txt
      --output dist/build-manifest.json
  artifacts:
    name: "gss-connected-release-$CI_COMMIT_SHA"
    expose_as: connected-release-build
    paths:
      - dist/release.pyz
      - dist/build-manifest.json
    expire_in: 7 days
    when: on_success
