ds4/.woodpecker/release.yaml
Johannes Loher 91b222a14e
Some checks failed
ci/woodpecker/pr/checks Pipeline failed
chore: switch to bun as package manager and test runner
2023-07-22 03:04:04 +02:00

43 lines
1.3 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:
- &bun_image oven/bun:latest
when:
event: manual
branch: ${CI_REPO_DEFAULT_BRANCH}
depends_on:
- checks
steps:
install:
image: *bun_image
commands:
- bun install --frozen-lockfile
release:
image: *bun_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}
- bun run bump-version --release=${RELEASE_TYPE}
- bunx prettier --write package.json system.json
- export RELEASE_VERSION=$(jq -r '.version' < package.json)
- git --no-pager diff
- git add package.json system.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