63 lines
1.6 KiB
YAML
63 lines
1.6 KiB
YAML
image: node:14.15.5-stretch-slim
|
|
|
|
variables:
|
|
GIT_DEPTH: 0
|
|
GIT_STRATEGY: fetch
|
|
|
|
stages:
|
|
- build
|
|
- release
|
|
|
|
build:
|
|
stage: build
|
|
before_script:
|
|
- apt update
|
|
- apt install -y zip
|
|
script:
|
|
- npm ci
|
|
- npm run build
|
|
- mkdir -p dist/lang
|
|
- mkdir -p dist/styles
|
|
- cp lang/* dist/lang/
|
|
- cp styles/* dist/styles/
|
|
- cp module.json dist
|
|
- cd dist
|
|
- zip wfrp4e-actor-sheet-print.zip -r *.* elements lang styles -x ".*"
|
|
artifacts:
|
|
name: wfrp4e-actor-sheet-print
|
|
when: on_success
|
|
paths:
|
|
- dist/wfrp4e-actor-sheet-print.zip
|
|
- dist/module.json
|
|
expire_in: 1 day
|
|
only:
|
|
- tags
|
|
- master
|
|
|
|
release:
|
|
stage: release
|
|
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
|
script:
|
|
- echo 'Running the release job.'
|
|
artifacts:
|
|
name: wfrp4e-actor-sheet-print
|
|
when: on_success
|
|
paths:
|
|
- dist/wfrp4e-actor-sheet-print.zip
|
|
- dist/module.json
|
|
expire_in: never
|
|
release:
|
|
tag_name: $CI_COMMIT_TAG
|
|
name: 'Release $CI_COMMIT_TAG'
|
|
description: './CHANGELOG.md'
|
|
assets:
|
|
links:
|
|
- name: 'content'
|
|
url: 'https://gitlab.com/greenskin-foundryvtt/wfrp4-actor-sheet-print/releases/$CI_COMMIT_TAG/downloads/wfrp4e-actor-sheet-print.zip'
|
|
filepath: '/jobs/$CI_JOB_ID/artifacts/dist/wfrp4e-actor-sheet-print.zip'
|
|
- name: 'manifest'
|
|
url: 'https://gitlab.com/greenskin-foundryvtt/wfrp4-actor-sheet-print/releases/$CI_COMMIT_TAG/downloads/module.json'
|
|
filepath: '/jobs/$CI_JOB_ID/artifacts/dist/module.json'
|
|
only:
|
|
- tags
|