Merge branch 'fix-publishing' into 'master'
ci: fix publishing to foundry admin See merge request saluu/darkness-dependent-vision!30
This commit is contained in:
commit
54806a71c2
2 changed files with 7 additions and 7 deletions
|
@ -23,15 +23,15 @@ steps:
|
||||||
NODE_ENV: production
|
NODE_ENV: production
|
||||||
commands:
|
commands:
|
||||||
- yarn build
|
- yarn build
|
||||||
|
- mv dist ${CI_REPO_NAME}
|
||||||
publish-artifacts:
|
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}/*
|
||||||
- CI_FORGE_API_URL=${CI_FORGE_URL}/api/v4
|
- 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}.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"'
|
- '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:
|
secrets:
|
||||||
|
@ -45,7 +45,7 @@ steps:
|
||||||
release:
|
release:
|
||||||
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||||
commands:
|
commands:
|
||||||
- CI_FORGE_API_URL=${CI_FORGE_URL}/api/v4
|
- export CI_FORGE_API_URL=${CI_FORGE_URL}/api/v4
|
||||||
- |
|
- |
|
||||||
release-cli \
|
release-cli \
|
||||||
--server-url ${CI_FORGE_URL} \
|
--server-url ${CI_FORGE_URL} \
|
||||||
|
@ -67,8 +67,8 @@ steps:
|
||||||
environment:
|
environment:
|
||||||
FVTT_DELETE_OBSOLETE_VERSIONS: 'true'
|
FVTT_DELETE_OBSOLETE_VERSIONS: 'true'
|
||||||
commands:
|
commands:
|
||||||
- FVTT_MANIFEST_PATH=${CI_REPO_NAME}/$${PACKAGE_TYPE}.json
|
- export FVTT_MANIFEST_PATH=${CI_REPO_NAME}/$${PACKAGE_TYPE}.json
|
||||||
- FVTT_MANIFEST_URL=${CI_REPO_URL}/-/releases/${CI_COMMIT_TAG}/downlaods/$${PACKAGE_TYPE}.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
|
||||||
|
|
|
@ -22,12 +22,12 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get install --yes jq
|
- apt-get install --yes jq
|
||||||
- REPOSITORY_URL=$(echo "${CI_REPO_CLONE_URL}" | sed -e "s|://|://$${FORGE_TOKEN_NAME}:$${FORGE_TOKEN}@|g")
|
- export REPOSITORY_URL=$(echo "${CI_REPO_CLONE_URL}" | sed -e "s|://|://$${FORGE_TOKEN_NAME}:$${FORGE_TOKEN}@|g")
|
||||||
- git remote set-url origin $${REPOSITORY_URL}
|
- git remote set-url origin $${REPOSITORY_URL}
|
||||||
- git config user.name woodpecker[bot]
|
- git config user.name woodpecker[bot]
|
||||||
- git config user.email woodpecker[bot]@${CI_SYSTEM_HOST}
|
- git config user.email woodpecker[bot]@${CI_SYSTEM_HOST}
|
||||||
- yarn bump-version --release=${RELEASE_TYPE}
|
- yarn bump-version --release=${RELEASE_TYPE}
|
||||||
- RELEASE_VERSION=$(jq -r '.version' < package.json)
|
- export RELEASE_VERSION=$(jq -r '.version' < package.json)
|
||||||
- git --no-pager diff
|
- git --no-pager diff
|
||||||
- git add package.json module.json
|
- git add package.json module.json
|
||||||
- 'git commit -m "chore(release): $${RELEASE_VERSION}"'
|
- 'git commit -m "chore(release): $${RELEASE_VERSION}"'
|
||||||
|
|
Loading…
Reference in a new issue