2023-06-13 01:09:51 +02:00
|
|
|
# SPDX-FileCopyrightText: 2023 Johannes Loher
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
variables:
|
|
|
|
- &node_image node:lts
|
|
|
|
|
|
|
|
when:
|
|
|
|
event: manual
|
2023-06-21 20:15:19 +02:00
|
|
|
branch: git2-test # ${CI_REPO_DEFAULT_BRANCH}
|
2023-06-13 01:09:51 +02:00
|
|
|
|
|
|
|
depends_on:
|
|
|
|
- checks
|
|
|
|
|
|
|
|
steps:
|
|
|
|
install:
|
|
|
|
image: *node_image
|
|
|
|
commands:
|
|
|
|
- yarn install --immutable
|
|
|
|
release:
|
|
|
|
image: *node_image
|
|
|
|
commands:
|
|
|
|
- apt-get update
|
|
|
|
- apt-get install --yes jq
|
2023-06-17 22:46:47 +02:00
|
|
|
- export REPOSITORY_URL=$(echo "${CI_REPO_CLONE_URL}" | sed -e "s|://|://$${FORGE_TOKEN_NAME}:$${FORGE_TOKEN}@|g")
|
2023-06-13 01:09:51 +02:00
|
|
|
- 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}
|
2023-06-17 22:46:47 +02:00
|
|
|
- export RELEASE_VERSION=$(jq -r '.version' < package.json)
|
2023-06-13 01:09:51 +02:00
|
|
|
- git --no-pager diff
|
|
|
|
- git add package.json module.json
|
|
|
|
- 'git commit -m "chore(release): $${RELEASE_VERSION}"'
|
|
|
|
- git tag -f $${RELEASE_VERSION}
|
|
|
|
- git push origin ${CI_COMMIT_BRANCH}
|
|
|
|
- git push origin $${RELEASE_VERSION}
|
|
|
|
secrets:
|
|
|
|
- forge_token_name
|
|
|
|
- forge_token
|