2023-10-10 23:29:26 -04:00
|
|
|
image: repo.n64.cc:443/nosial/ncc:latest
|
2023-01-29 21:45:12 -05:00
|
|
|
|
2023-10-10 23:29:26 -04:00
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- publish
|
2023-01-29 21:45:12 -05:00
|
|
|
|
2023-10-10 23:29:26 -04:00
|
|
|
variables:
|
|
|
|
PACKAGE_NAME: $CI_COMMIT_REF_NAME
|
2023-01-29 21:45:12 -05:00
|
|
|
|
|
|
|
build:
|
2023-10-10 23:29:26 -04:00
|
|
|
stage: build
|
2023-01-29 21:45:12 -05:00
|
|
|
script:
|
2023-10-10 23:29:26 -04:00
|
|
|
- ncc build --config release --log-level debug -o "build/release/net.nosial.loglib.ncc"
|
2023-01-29 21:45:12 -05:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2023-10-10 23:29:26 -04:00
|
|
|
- "build/release/net.nosial.loglib.ncc"
|
2023-01-29 21:45:12 -05:00
|
|
|
|
2023-10-10 23:29:26 -04:00
|
|
|
build_static:
|
|
|
|
stage: build
|
2023-01-29 21:45:12 -05:00
|
|
|
script:
|
2023-10-11 18:35:01 -04:00
|
|
|
- ncc project install
|
2023-10-10 23:29:26 -04:00
|
|
|
- ncc build --config release_static --log-level debug -o "build/release/net.nosial.loglib_static.ncc"
|
2023-01-29 21:45:12 -05:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2023-10-10 23:29:26 -04:00
|
|
|
- "build/release/net.nosial.loglib_static.ncc"
|
|
|
|
|
|
|
|
publish:
|
|
|
|
stage: publish
|
|
|
|
before_script:
|
|
|
|
- 'if [ "$CI_COMMIT_REF_NAME" == "master" ]; then PACKAGE_NAME="latest"; fi'
|
|
|
|
script:
|
|
|
|
- |
|
|
|
|
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/release/net.nosial.loglib.ncc \
|
|
|
|
"https://$CI_SERVER_HOST/api/v4/projects/$CI_PROJECT_ID/packages/generic/${PACKAGE_NAME}/${CI_COMMIT_SHA}/net.nosial.loglib.ncc"
|
|
|
|
|
|
|
|
publish_static:
|
|
|
|
stage: publish
|
|
|
|
before_script:
|
|
|
|
- 'if [ "$CI_COMMIT_REF_NAME" == "master" ]; then PACKAGE_NAME="latest"; fi'
|
|
|
|
script:
|
|
|
|
- |
|
|
|
|
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/release/net.nosial.loglib_static.ncc \
|
|
|
|
"https://$CI_SERVER_HOST/api/v4/projects/$CI_PROJECT_ID/packages/generic/${PACKAGE_NAME}/${CI_COMMIT_SHA}/net.nosial.loglib_static.ncc"
|