ci: fix publishing to foundry admin

This commit is contained in:
Johannes Loher 2023-06-17 22:46:47 +02:00
parent 87b9b57f65
commit 18a66e4748
2 changed files with 7 additions and 7 deletions

View file

@ -23,15 +23,15 @@ steps:
NODE_ENV: production
commands:
- yarn build
- mv dist ${CI_REPO_NAME}
publish-artifacts:
group: prepare-release
image: alpine:latest
commands:
- apk update
- apk add zip curl
- mv dist ${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}/$${PACKAGE_TYPE}.json "$${CI_FORGE_API_URL}/projects/${CI_REPO_REMOTE_ID}/packages/generic/${CI_REPO_NAME}/${CI_COMMIT_TAG}/$${PACKAGE_TYPE}.json"'
secrets:
@ -45,7 +45,7 @@ steps:
release:
image: registry.gitlab.com/gitlab-org/release-cli:latest
commands:
- CI_FORGE_API_URL=${CI_FORGE_URL}/api/v4
- export CI_FORGE_API_URL=${CI_FORGE_URL}/api/v4
- |
release-cli \
--server-url ${CI_FORGE_URL} \
@ -67,8 +67,8 @@ steps:
environment:
FVTT_DELETE_OBSOLETE_VERSIONS: 'true'
commands:
- 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_PATH=${CI_REPO_NAME}/$${PACKAGE_TYPE}.json
- export FVTT_MANIFEST_URL=${CI_REPO_URL}/-/releases/${CI_COMMIT_TAG}/downlaods/$${PACKAGE_TYPE}.json
- foundry-publish
secrets:
- fvtt_package_id

View file

@ -22,12 +22,12 @@ steps:
commands:
- apt-get update
- 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 config user.name woodpecker[bot]
- git config user.email woodpecker[bot]@${CI_SYSTEM_HOST}
- 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 add package.json module.json
- 'git commit -m "chore(release): $${RELEASE_VERSION}"'