This commit is contained in:
parent
6e46d90405
commit
5065b25cbb
3 changed files with 38 additions and 43 deletions
|
@ -23,55 +23,50 @@ steps:
|
||||||
NODE_ENV: production
|
NODE_ENV: production
|
||||||
commands:
|
commands:
|
||||||
- yarn build
|
- yarn build
|
||||||
- mv dist ${CI_REPO_NAME}
|
package:
|
||||||
publish-artifacts:
|
|
||||||
group: prepare-release
|
group: prepare-release
|
||||||
image: alpine:latest
|
image: alpine:latest
|
||||||
commands:
|
commands:
|
||||||
- apk update
|
- apk update
|
||||||
- apk add zip curl
|
- apk add zip curl
|
||||||
|
- mv dist ${CI_REPO_NAME}
|
||||||
- zip -r ${CI_REPO_NAME}.zip ${CI_REPO_NAME}/*
|
- zip -r ${CI_REPO_NAME}.zip ${CI_REPO_NAME}/*
|
||||||
- export CI_FORGE_API_URL=${CI_FORGE_URL}/api/v4
|
|
||||||
- 'curl --fail --header "Authorization: Bearer $${FORGE_TOKEN}" --upload-file ${CI_REPO_NAME}.zip "$${CI_FORGE_API_URL}/projects/${CI_REPO_REMOTE_ID}/packages/generic/${CI_REPO_NAME}/${CI_COMMIT_TAG}/${CI_REPO_NAME}.zip"'
|
|
||||||
- 'curl --fail --header "Authorization: Bearer $${FORGE_TOKEN}" --upload-file ${CI_REPO_NAME}/$${PACKAGE_TYPE}.json "$${CI_FORGE_API_URL}/projects/${CI_REPO_REMOTE_ID}/packages/generic/${CI_REPO_NAME}/${CI_COMMIT_TAG}/$${PACKAGE_TYPE}.json"'
|
|
||||||
secrets:
|
|
||||||
- forge_token
|
|
||||||
- package_type
|
|
||||||
changelog:
|
changelog:
|
||||||
group: prepare-release
|
group: prepare-release
|
||||||
image: *node_image
|
image: *node_image
|
||||||
commands:
|
commands:
|
||||||
- yarn changelog
|
- yarn changelog
|
||||||
release:
|
release:
|
||||||
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
image: woodpeckerci/plugin-gitea-release
|
||||||
|
settings:
|
||||||
|
base_url: ${CI_FORGE_URL}
|
||||||
|
title: ${CI_COMMIT_TAG}
|
||||||
|
note: CHANGELOG.md
|
||||||
|
files:
|
||||||
|
- ${CI_REPO_NAME}.zip
|
||||||
|
- ${CI_REPO_NAME}/module.json
|
||||||
|
api_key:
|
||||||
|
from_secret: forge_token
|
||||||
|
publish-latest-manifest:
|
||||||
|
group: publish
|
||||||
|
image: alpine:latest
|
||||||
commands:
|
commands:
|
||||||
- export CI_FORGE_API_URL=${CI_FORGE_URL}/api/v4
|
- apk update
|
||||||
- |
|
- apk add curl
|
||||||
release-cli \
|
- export CI_FORGE_API_URL=${CI_FORGE_URL}/api
|
||||||
--server-url ${CI_FORGE_URL} \
|
- 'curl --fail --header "Authorization: token $${FORGE_TOKEN}" -X "DELETE" "$${CI_FORGE_API_URL}/packages/${CI_REPO_OWNER}/generic/${CI_REPO_NAME}/latest/module.json"'
|
||||||
--private-token $${FORGE_TOKEN} \
|
- 'curl --fail --header "Authorization: token $${FORGE_TOKEN}" --upload-file ${CI_REPO_NAME}/module.json "$${CI_FORGE_API_URL}/packages/${CI_REPO_OWNER}/generic/${CI_REPO_NAME}/latest/module.json"'
|
||||||
--project-id ${CI_REPO_REMOTE_ID} \
|
|
||||||
create \
|
|
||||||
--name ${CI_COMMIT_TAG} \
|
|
||||||
--description CHANGELOG.md \
|
|
||||||
--tag-name ${CI_COMMIT_TAG} \
|
|
||||||
--assets-link "[\
|
|
||||||
{\"name\": \"${CI_REPO_NAME}.zip\", \"url\": \"$${CI_FORGE_API_URL}/projects/${CI_REPO_REMOTE_ID}/packages/generic/${CI_REPO_NAME}/${CI_COMMIT_TAG}/${CI_REPO_NAME}.zip\", \"filepath\": \"/${CI_REPO_NAME}.zip\", \"link_type\": \"package\"},\
|
|
||||||
{\"name\": \"$${PACKAGE_TYPE}.json\", \"url\": \"$${CI_FORGE_API_URL}/projects/${CI_REPO_REMOTE_ID}/packages/generic/${CI_REPO_NAME}/${CI_COMMIT_TAG}/$${PACKAGE_TYPE}.json\", \"filepath\": \"/$${PACKAGE_TYPE}.json\", \"link_type\": \"other\"}\
|
|
||||||
]"
|
|
||||||
secrets:
|
secrets:
|
||||||
- forge_token
|
- forge_token
|
||||||
- package_type
|
# publish-to-foundry-admin:
|
||||||
publish-to-foundry-admin:
|
# image: johannesloher/foundry-publish
|
||||||
image: johannesloher/foundry-publish
|
# environment:
|
||||||
environment:
|
# FVTT_DELETE_OBSOLETE_VERSIONS: 'true'
|
||||||
FVTT_DELETE_OBSOLETE_VERSIONS: 'true'
|
# commands:
|
||||||
commands:
|
# - export FVTT_MANIFEST_PATH=${CI_REPO_NAME}/module.json
|
||||||
- export FVTT_MANIFEST_PATH=${CI_REPO_NAME}/$${PACKAGE_TYPE}.json
|
# - export FVTT_MANIFEST_URL=${CI_REPO_URL}/-/releases/${CI_COMMIT_TAG}/downlaods/module.json
|
||||||
- export FVTT_MANIFEST_URL=${CI_REPO_URL}/-/releases/${CI_COMMIT_TAG}/downlaods/$${PACKAGE_TYPE}.json
|
# - foundry-publish
|
||||||
- foundry-publish
|
# secrets:
|
||||||
secrets:
|
# - fvtt_package_id
|
||||||
- fvtt_package_id
|
# - fvtt_username
|
||||||
- fvtt_username
|
# - fvtt_password
|
||||||
- fvtt_password
|
|
||||||
- package_type
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ variables:
|
||||||
|
|
||||||
when:
|
when:
|
||||||
event: manual
|
event: manual
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
branch: git2-test # ${CI_REPO_DEFAULT_BRANCH}
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- checks
|
- checks
|
||||||
|
|
|
@ -8,13 +8,13 @@ import yargs from 'yargs';
|
||||||
import { hideBin } from 'yargs/helpers';
|
import { hideBin } from 'yargs/helpers';
|
||||||
|
|
||||||
const repository = 'saluu/darkness-dependent-vision';
|
const repository = 'saluu/darkness-dependent-vision';
|
||||||
const gitlabURL = 'https://git.f3l.de';
|
const giteaURL = 'https://git2.f3l.de';
|
||||||
|
|
||||||
const getLicenseURL = (version) => `${gitlabURL}/${repository}/-/raw/${version}/LICENSE.md`;
|
const getLicenseURL = (version) => `${giteaURL}/${repository}/raw/tag/${version}/LICENSE.md`;
|
||||||
const getReadmeURL = (version) => `${gitlabURL}/${repository}/-/raw/${version}/README.md`;
|
const getReadmeURL = (version) => `${giteaURL}/${repository}/raw/tag/${version}/README.md`;
|
||||||
const getChangelogURL = (version) => `${gitlabURL}/${repository}/-/releases/${version}`;
|
const getChangelogURL = (version) => `${giteaURL}/${repository}/releases/tag/${version}`;
|
||||||
const getDownloadURL = (version) =>
|
const getDownloadURL = (version) =>
|
||||||
`${gitlabURL}/${repository}/-/releases/${version}/downloads/darkness-dependent-vision.zip`;
|
`${giteaURL}/${repository}/releases/download/${version}/darkness-dependent-vision.zip`;
|
||||||
|
|
||||||
const manifestPath = 'module.json';
|
const manifestPath = 'module.json';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue