diff --git a/.woodpecker.yml b/.woodpecker.yml index 55893ea..bbcef3b 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,13 +1,34 @@ when: - event: [push, pull_request] + event: [push, tag, pull_request] steps: lint: image: python:3.12-alpine commands: - # Install Ruff (extremely fast linter) + # Install Ruff for linting - pip install --no-cache-dir ruff # Check syntax and undefined names/variables across your Python files - ruff check . - # Optional: Check formatting compliance + # Check formatting compliance - ruff format --check . + + package: + image: alpine:latest + commands: + - mkdir -p dist + # Tar up Python files and example configs into a versioned archive + - tar -czf dist/pico-weather-${CI_COMMIT_TAG:-dev}.tar.gz *.py pyproject.toml README.md + when: + event: tag + + gitea_release: + image: plugins/gitea-release + settings: + api_key: + from_secret: gitea_api_key + base_url: https://git.metaunix.net + title: "${CI_COMMIT_TAG}" + files: + - dist/pico-weather-*.tar.gz + when: + event: tag