stages:
  - Package
  - Build

tarball:
  stage: Package
  image: alpine:latest
  before_script:
    - apk add --no-cache git make perl
  script:
    - git submodule sync
    - git submodule update --init --recursive
    - git submodule foreach git pull origin master
    - make -f tools/star/Makefile release VERSION=$CI_COMMIT_REF_NAME
  artifacts:
    paths:
      - release

moar:
  stage: Build
  image: alpine:latest
  before_script:
    - apk add --no-cache bash build-base git perl
    - cd "$(mktemp -d)"
    - tar xf "$CI_PROJECT_DIR/release/rakudo-star-$CI_COMMIT_REF_NAME.tar.gz"
  script:
    - perl Configure.pl --prefix=/usr/local --backend=moar --gen-moar
  artifacts:
    paths:
      - "$CI_COMMIT_REF_NAME/release"
      - /usr/local

stages:
  - Package
  - Build

tarball:
  stage: Package
  image: alpine:latest
  before_script:
    - apk add --no-cache git make perl
  script:
    - git submodule sync
    - git submodule update --init --recursive
    - git submodule foreach git pull origin master
    - make -f tools/star/Makefile release VERSION=$CI_COMMIT_REF_NAME
  artifacts:
    paths:
      - release

moar:
  stage: Build
  image: alpine:latest
  before_script:
    - apk add --no-cache bash build-base git perl
    - cd "$(mktemp -d)"
    - tar xf "$CI_PROJECT_DIR/release/rakudo-star-$CI_COMMIT_REF_NAME.tar.gz"
  script:
    - cd "rakudo-star-$CI_COMMIT_REF_NAME"
    - perl Configure.pl --prefix=/usr/local --backend=moar --gen-moar
  artifacts:
    paths:
      - "$CI_COMMIT_REF_NAME/release"
      - /usr/local

Change directory to latest release
Change directory to latest release
