Commit beef01da authored by Richard Winters's avatar Richard Winters 🌚
Browse files

Added GitLab-CI configuration

* Testing continuous deployment configuration based on example provided at https://gitlab.com/gitlab-org/release-cli/-/tree/master/docs/examples/release-assets-as-generic-package/
parent 2555eeed
Pipeline #240437705 failed with stages
in 1 minute and 46 seconds
stages:
- build
- upload
- release
variables:
PACKAGE_VERSION: "1.2.3"
PACKAGE_ARCHIVE: "mmod-panel_${PACKAGE_VERSION}.zip"
PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/mmod-panel/${PACKAGE_VERSION}"
before_script:
- apt-get update -qq && apt-get upgrade -y -qq && apt-get install -y -qq curl software-properties-common
- curl -sL https://deb.nodesource.com/setup_12.x | bash -
- apt-get install -y -qq nodejs
cache:
paths:
- node_modules/
build:
stage: build
script:
- npm install
- npm run build:release
artifacts:
paths:
- build/
rules:
- when: always
upload:
stage: upload
dependencies:
- build
image: curlimages/curl:latest
rules:
- if: $CI_COMMIT_TAG
when: on_success
script:
- |
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file build/release/mmod-panel.zip ${PACKAGE_REGISTRY_URL}/${PACKAGE_ARCHIVE}
release:
stage: release
dependencies:
- build
- upload
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_TAG
when: on_success
script:
- |
release-cli create --name "Release $CI_COMMIT_TAG" --tag-name $CI_COMMIT_TAG \
--assets-link "{\"name\":\"${DARWIN_AMD64_BINARY}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${PACKAGE_ARCHIVE}\"}"
#pages:
# stage: deploy
# dependencies:
# - kux
# script:
# - mkdir public/
# - mv docs/ public/docs/
# - mv dist/ public/dist/
# - mv images/ public/images/
# - mv index.html public/index.html
# artifacts:
# paths:
# - public
# expire_in: 30 days
# only:
# - master
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment