ci: test gitea
All checks were successful
ci/woodpecker/push/checks Pipeline was successful
ci/woodpecker/manual/checks Pipeline was successful
ci/woodpecker/manual/release Pipeline was successful

This commit is contained in:
Johannes Loher 2023-06-21 20:15:19 +02:00
parent 6e46d90405
commit c0b1f83e19
2 changed files with 38 additions and 41 deletions

View file

@ -23,55 +23,52 @@ 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 # publish-artifacts:
- '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"' # group: prepare-release
- '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"' # image: alpine:latest
secrets: # commands:
- forge_token # - apk update
- package_type # - apk add zip curl
# - zip -r ${CI_REPO_NAME}.zip ${CI_REPO_NAME}/*
# - export CI_FORGE_API_URL=${CI_FORGE_URL}/api
# - 'curl --fail --header "Authorization: token $${FORGE_TOKEN}" --upload-file ${CI_REPO_NAME}.zip "$${CI_FORGE_API_URL}/packages/${CI_REPO_OWNER}/generic/${CI_REPO_NAME}/${CI_COMMIT_TAG}/${CI_REPO_NAME}.zip"'
# - '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}/${CI_COMMIT_TAG}/module.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
commands: settings:
- export CI_FORGE_API_URL=${CI_FORGE_URL}/api/v4 base_url: ${CI_FORGE_URL}
- | title: ${CI_COMMIT_TAG}
release-cli \ note: CHANGELOG.md
--server-url ${CI_FORGE_URL} \ files:
--private-token $${FORGE_TOKEN} \ - ${CI_REPO_NAME}.zip
--project-id ${CI_REPO_REMOTE_ID} \ - ${CI_REPO_NAME}/module.json
create \ api_key:
--name ${CI_COMMIT_TAG} \ from_secret: forge_token
--description CHANGELOG.md \ # publish-to-foundry-admin:
--tag-name ${CI_COMMIT_TAG} \ # image: johannesloher/foundry-publish
--assets-link "[\ # environment:
{\"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\"},\ # FVTT_DELETE_OBSOLETE_VERSIONS: 'true'
{\"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\"}\ # commands:
]" # - export FVTT_MANIFEST_PATH=${CI_REPO_NAME}/module.json
secrets: # - export FVTT_MANIFEST_URL=${CI_REPO_URL}/-/releases/${CI_COMMIT_TAG}/downlaods/module.json
- forge_token # - foundry-publish
- package_type # secrets:
publish-to-foundry-admin: # - fvtt_package_id
image: johannesloher/foundry-publish # - fvtt_username
environment: # - fvtt_password
FVTT_DELETE_OBSOLETE_VERSIONS: 'true'
commands:
- 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
- fvtt_username
- fvtt_password
- package_type

View file

@ -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