xoxys.general/.woodpecker/build-package.yml
Robert Kaussow 1d4501e306
Some checks failed
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/unit-test Pipeline failed
ci/woodpecker/pr/sanity-test Pipeline was successful
ci/woodpecker/pr/build-package unknown status
ci/woodpecker/pr/docs unknown status
avoid matrix builds for better readability
2023-12-13 09:31:35 +01:00

50 lines
1.2 KiB
YAML

---
when:
- event: [pull_request, tag]
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
steps:
build:
image: docker.io/library/python:3.12
commands:
- git fetch --depth=2147483647
- GALAXY_VERSION=${DRONE_TAG##v}
- 'sed -i ''s/version: 0.0.0/version: ''"$${GALAXY_VERSION:-0.0.0}"''/g'' galaxy.yml'
- pip install poetry -qq
- poetry install --all-extras --no-root
- poetry run ansible-galaxy collection build --output-path dist/
checksum:
image: quay.io/thegeeklab/alpine-tools
commands:
- cd dist/ && sha256sum * > ../sha256sum.txt
changelog:
image: quay.io/thegeeklab/git-sv
commands:
- git fetch --depth=2147483647
- git sv current-version
- git sv release-notes -t ${CI_COMMIT_TAG:-next} -o CHANGELOG.md
- cat CHANGELOG.md
publish-gitea:
image: docker.io/plugins/github-release
settings:
api_key:
from_secret: gitea_token
base_url: https://gitea.rknet.org
files:
- dist/*
- sha256sum.txt
note: CHANGELOG.md
overwrite: true
title: ${CI_COMMIT_TAG}
when:
- event: [tag]
depends_on:
- unit-test
- sanity-test