tickwerk/.woodpecker/release.yaml
Renovate Bot 27992aa4d6
All checks were successful
ci/woodpecker/pr/checks Pipeline was successful
ci/woodpecker/push/checks Pipeline was successful
chore(deps): update yarn to v4
2023-11-05 22:16:46 +01:00

42 lines
1.2 KiB
YAML

# SPDX-FileCopyrightText: 2023 Johannes Loher
#
# SPDX-License-Identifier: MIT
$schema: https://raw.githubusercontent.com/woodpecker-ci/woodpecker/master/pipeline/schema/schema.json
variables:
- &node_image node:lts
when:
event: manual
branch: ${CI_REPO_DEFAULT_BRANCH}
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
- 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}
- export RELEASE_VERSION=$(jq -r '.version' < package.json)
- yarn prettier --write package.json module.json
- 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