ci: publish to foundry automatically
This commit is contained in:
parent
773af35fa9
commit
f36c7f52b7
3 changed files with 28 additions and 4 deletions
|
@ -8,8 +8,9 @@ image: node:lts
|
|||
stages:
|
||||
- test
|
||||
- build
|
||||
- publish
|
||||
- prepare-release
|
||||
- release
|
||||
- publish
|
||||
|
||||
cache: &global_cache
|
||||
paths:
|
||||
|
@ -61,8 +62,8 @@ build:
|
|||
expire_in: 1 week
|
||||
|
||||
publish-artifacts:
|
||||
stage: prepare-release
|
||||
image: alpine:latest
|
||||
stage: publish
|
||||
before_script:
|
||||
- apk update
|
||||
- apk add zip curl
|
||||
|
@ -70,12 +71,11 @@ publish-artifacts:
|
|||
zip -r ds4.zip ds4/*
|
||||
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ds4.zip "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/ds4/$CI_COMMIT_TAG/ds4.zip"
|
||||
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ds4/system.json "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/ds4/$CI_COMMIT_TAG/system.json"
|
||||
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ds4/system.json "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/ds4/latest/system.json"
|
||||
rules:
|
||||
- if: '$CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/'
|
||||
|
||||
changelog:
|
||||
stage: publish
|
||||
stage: prepare-release
|
||||
before_script:
|
||||
- yarn install --immutable
|
||||
script:
|
||||
|
@ -150,3 +150,24 @@ release:
|
|||
url: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/ds4/$CI_COMMIT_TAG/system.json"
|
||||
filepath: /system.json
|
||||
link_type: other
|
||||
|
||||
publish-latest-manifest:
|
||||
stage: publish
|
||||
image: alpine:latest
|
||||
before_script:
|
||||
- apk update
|
||||
- apk add zip curl
|
||||
script: |
|
||||
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ds4/system.json "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/ds4/latest/system.json"
|
||||
rules:
|
||||
- if: '$CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/'
|
||||
|
||||
publish-to-foundry-admin:
|
||||
stage: publish
|
||||
image: johannesloher/foundry-publish
|
||||
variables:
|
||||
FVTT_MANIFEST_PATH: ./src/system.json
|
||||
FVTT_MANIFEST_URL: ${CI_PROJECT_URL}/-/releases/${CI_COMMIT_TAG}/downloads/system.json
|
||||
script: foundry-publish
|
||||
rules:
|
||||
- if: '$CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue