2023-12-13 10:23:28 +00:00
|
|
|
---
|
|
|
|
when:
|
|
|
|
- event: [pull_request, tag]
|
|
|
|
- event: [push, manual]
|
|
|
|
branch:
|
|
|
|
- ${CI_REPO_DEFAULT_BRANCH}
|
|
|
|
|
|
|
|
steps:
|
2024-01-16 13:30:08 +00:00
|
|
|
- name: build
|
2023-12-13 10:23:28 +00:00
|
|
|
image: docker.io/library/python:3.12
|
|
|
|
commands:
|
2024-01-16 13:30:08 +00:00
|
|
|
- GALAXY_VERSION=${CI_COMMIT_TAG##v}
|
2023-12-13 10:23:28 +00:00
|
|
|
- '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/
|
|
|
|
|
2024-01-16 13:30:08 +00:00
|
|
|
- name: checksum
|
2023-12-13 10:23:28 +00:00
|
|
|
image: quay.io/thegeeklab/alpine-tools
|
|
|
|
commands:
|
|
|
|
- cd dist/ && sha256sum * > ../sha256sum.txt
|
|
|
|
|
2024-01-16 13:30:08 +00:00
|
|
|
- name: changelog
|
2023-12-13 10:23:28 +00:00
|
|
|
image: quay.io/thegeeklab/git-sv
|
|
|
|
commands:
|
|
|
|
- git sv current-version
|
|
|
|
- git sv release-notes -t ${CI_COMMIT_TAG:-next} -o CHANGELOG.md
|
|
|
|
- cat CHANGELOG.md
|
|
|
|
|
2024-01-16 13:30:08 +00:00
|
|
|
- name: publish-gitea
|
2024-03-26 12:44:24 +00:00
|
|
|
image: quay.io/thegeeklab/wp-gitea-release
|
2023-12-13 10:23:28 +00:00
|
|
|
settings:
|
|
|
|
api_key:
|
|
|
|
from_secret: gitea_token
|
|
|
|
base_url: https://gitea.rknet.org
|
|
|
|
files:
|
|
|
|
- dist/*
|
|
|
|
- sha256sum.txt
|
|
|
|
note: CHANGELOG.md
|
|
|
|
title: ${CI_COMMIT_TAG}
|
|
|
|
when:
|
|
|
|
- event: [tag]
|
|
|
|
|
|
|
|
depends_on:
|
|
|
|
- unit-test
|
|
|
|
- sanity-test
|