configlib/.gitlab-ci.yml

44 lines
1.3 KiB
YAML

image: php:8.3
before_script:
# Install some stuff that the image doesn't come with
- apt update -yqq
- apt install git libpq-dev libzip-dev zip make wget gnupg -yqq
# Add the Debian sid repository and its key
- echo "deb http://deb.debian.org/debian sid main" | tee /etc/apt/sources.list.d/debian-sid.list
- wget -O - https://ftp-master.debian.org/keys/archive-key-12.asc | apt-key add -
# Update the package list to include the new repository
- apt-get update -yqq
# Install phpab
- apt-get install -yqq phpab
# Install the latest version of ncc (Nosial Code Compiler)
- git clone https://git.n64.cc/nosial/ncc.git
- cd ncc
- make redist
- php build/src/INSTALL --auto --install-composer
- cd .. && rm -rf ncc
build:
script:
- ncc build --config release --log-level debug
artifacts:
paths:
- build/
rules:
- if: $CI_COMMIT_BRANCH
release:
stage: deploy
script:
- ncc build --config release --log-level debug
- >
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/release/net.nosial.configlib.ncc "$CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/generic/net.nosial.configlib/$CI_COMMIT_REF_NAME/net.nosial.configlib.ncc"
artifacts:
paths:
- build/
rules:
- if: $CI_COMMIT_TAG