Merge branch 'publish-to-foundry-automatically' into 'master'
Publish to foundry automatically See merge request dungeonslayers/ds4!142
This commit is contained in:
commit
c0dc0b98c8
3 changed files with 51 additions and 27 deletions
|
@ -8,8 +8,9 @@ image: node:lts
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
- build
|
- build
|
||||||
- publish
|
- prepare-release
|
||||||
- release
|
- release
|
||||||
|
- publish
|
||||||
|
|
||||||
cache: &global_cache
|
cache: &global_cache
|
||||||
paths:
|
paths:
|
||||||
|
@ -61,8 +62,8 @@ build:
|
||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
|
|
||||||
publish-artifacts:
|
publish-artifacts:
|
||||||
|
stage: prepare-release
|
||||||
image: alpine:latest
|
image: alpine:latest
|
||||||
stage: publish
|
|
||||||
before_script:
|
before_script:
|
||||||
- apk update
|
- apk update
|
||||||
- apk add zip curl
|
- apk add zip curl
|
||||||
|
@ -70,12 +71,11 @@ publish-artifacts:
|
||||||
zip -r ds4.zip ds4/*
|
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.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/$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:
|
rules:
|
||||||
- if: '$CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/'
|
- if: '$CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/'
|
||||||
|
|
||||||
changelog:
|
changelog:
|
||||||
stage: publish
|
stage: prepare-release
|
||||||
before_script:
|
before_script:
|
||||||
- yarn install --immutable
|
- yarn install --immutable
|
||||||
script:
|
script:
|
||||||
|
@ -150,3 +150,24 @@ release:
|
||||||
url: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/ds4/$CI_COMMIT_TAG/system.json"
|
url: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/ds4/$CI_COMMIT_TAG/system.json"
|
||||||
filepath: /system.json
|
filepath: /system.json
|
||||||
link_type: other
|
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]+$/'
|
||||||
|
|
|
@ -24,6 +24,7 @@ const stylesExtension = ".scss";
|
||||||
const sourceFileExtension = ".ts";
|
const sourceFileExtension = ".ts";
|
||||||
const staticFiles = ["assets", "fonts", "lang", "packs", "templates", "system.json", "template.json"];
|
const staticFiles = ["assets", "fonts", "lang", "packs", "templates", "system.json", "template.json"];
|
||||||
const getDownloadURL = (version) => `https://git.f3l.de/dungeonslayers/ds4/-/releases/${version}/downloads/ds4.zip`;
|
const getDownloadURL = (version) => `https://git.f3l.de/dungeonslayers/ds4/-/releases/${version}/downloads/ds4.zip`;
|
||||||
|
const getChangelogURL = (version) => `https://git.f3l.de/dungeonslayers/ds4/-/releases/${version}`;
|
||||||
|
|
||||||
/********************/
|
/********************/
|
||||||
/* BUILD */
|
/* BUILD */
|
||||||
|
@ -210,6 +211,7 @@ function bumpVersion(cb) {
|
||||||
|
|
||||||
manifest.file.version = targetVersion;
|
manifest.file.version = targetVersion;
|
||||||
manifest.file.download = getDownloadURL(targetVersion);
|
manifest.file.download = getDownloadURL(targetVersion);
|
||||||
|
manifest.file.changelog = getChangelogURL(targetVersion);
|
||||||
fs.writeJSONSync(path.join(sourceDirectory, manifest.name), manifest.file, { spaces: 4 });
|
fs.writeJSONSync(path.join(sourceDirectory, manifest.name), manifest.file, { spaces: 4 });
|
||||||
|
|
||||||
return cb();
|
return cb();
|
||||||
|
|
|
@ -2,9 +2,6 @@
|
||||||
"name": "ds4",
|
"name": "ds4",
|
||||||
"title": "Dungeonslayers 4",
|
"title": "Dungeonslayers 4",
|
||||||
"description": "The Dungeonslayers 4 system for FoundryVTT. Dungeonslayers by Christian Kennig is licensed under CC BY-NC-SA 3.0 (https://creativecommons.org/licenses/by-nc-sa/3.0/). The icons by the authors of Game-icons.net are licensed under CC BY 3.0 (https://creativecommons.org/licenses/by/3.0/). The token images by Devin Night (https://immortalnights.com/) and are licensed under the terms described at https://immortalnights.com/tokens/token-usage-rights/.",
|
"description": "The Dungeonslayers 4 system for FoundryVTT. Dungeonslayers by Christian Kennig is licensed under CC BY-NC-SA 3.0 (https://creativecommons.org/licenses/by-nc-sa/3.0/). The icons by the authors of Game-icons.net are licensed under CC BY 3.0 (https://creativecommons.org/licenses/by/3.0/). The token images by Devin Night (https://immortalnights.com/) and are licensed under the terms described at https://immortalnights.com/tokens/token-usage-rights/.",
|
||||||
"version": "1.4.3",
|
|
||||||
"minimumCoreVersion": "0.8.8",
|
|
||||||
"compatibleCoreVersion": "0.8.9",
|
|
||||||
"author": "Johannes Loher, Gesina Schwalbe, Oliver Rümpelein, Siegfried Krug, Max Tharr, Sascha Martens",
|
"author": "Johannes Loher, Gesina Schwalbe, Oliver Rümpelein, Siegfried Krug, Max Tharr, Sascha Martens",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
|
@ -30,9 +27,28 @@
|
||||||
"name": "Sascha Martens"
|
"name": "Sascha Martens"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"url": "https://git.f3l.de/dungeonslayers/ds4",
|
||||||
|
"license": "https://git.f3l.de/dungeonslayers/ds4/-/blob/master/README.md#licensing",
|
||||||
|
"readme": "https://git.f3l.de/dungeonslayers/ds4/-/blob/master/README.md",
|
||||||
|
"bugs": "https://git.f3l.de/dungeonslayers/ds4/-/issues",
|
||||||
|
"changelog": "https://git.f3l.de/dungeonslayers/ds4/-/releases/1.4.3",
|
||||||
|
"version": "1.4.3",
|
||||||
|
"minimumCoreVersion": "0.8.8",
|
||||||
|
"compatibleCoreVersion": "0.8.9",
|
||||||
"esmodules": ["module/ds4.js"],
|
"esmodules": ["module/ds4.js"],
|
||||||
"styles": ["css/ds4.css"],
|
"styles": ["css/ds4.css"],
|
||||||
"scripts": [],
|
"languages": [
|
||||||
|
{
|
||||||
|
"lang": "en",
|
||||||
|
"name": "English",
|
||||||
|
"path": "lang/en.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lang": "de",
|
||||||
|
"name": "Deutsch",
|
||||||
|
"path": "lang/de.json"
|
||||||
|
}
|
||||||
|
],
|
||||||
"packs": [
|
"packs": [
|
||||||
{
|
{
|
||||||
"name": "special-creature-abilities",
|
"name": "special-creature-abilities",
|
||||||
|
@ -75,26 +91,11 @@
|
||||||
"entity": "Actor"
|
"entity": "Actor"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"languages": [
|
"manifest": "https://git.f3l.de/api/v4/projects/dungeonslayers%2Fds4/packages/generic/ds4/latest/system.json",
|
||||||
{
|
"download": "https://git.f3l.de/dungeonslayers/ds4/-/releases/1.4.3/downloads/ds4.zip",
|
||||||
"lang": "en",
|
"initiative": "@combatValues.initiative.total",
|
||||||
"name": "English",
|
|
||||||
"path": "lang/en.json"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"lang": "de",
|
|
||||||
"name": "Deutsch",
|
|
||||||
"path": "lang/de.json"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"gridDistance": 1,
|
"gridDistance": 1,
|
||||||
"gridUnits": "m",
|
"gridUnits": "m",
|
||||||
"primaryTokenAttribute": "combatValues.hitPoints",
|
"primaryTokenAttribute": "combatValues.hitPoints",
|
||||||
"url": "https://git.f3l.de/dungeonslayers/ds4",
|
"manifestPlusVersion": "1.0.0"
|
||||||
"manifest": "https://git.f3l.de/api/v4/projects/dungeonslayers%2Fds4/packages/generic/ds4/latest/system.json",
|
|
||||||
"download": "https://git.f3l.de/dungeonslayers/ds4/-/releases/1.4.3/downloads/ds4.zip",
|
|
||||||
"license": "https://git.f3l.de/dungeonslayers/ds4#licensing",
|
|
||||||
"initiative": "@combatValues.initiative.total",
|
|
||||||
"manifestPlusVersion": "1.0.0",
|
|
||||||
"bugs": "https://git.f3l.de/dungeonslayers/ds4/-/issues"
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue