diff --git a/.forgejo/workflows/package.yml b/.forgejo/workflows/package.yml new file mode 100644 index 0000000..63af42a --- /dev/null +++ b/.forgejo/workflows/package.yml @@ -0,0 +1,38 @@ +--- + +on: + push: + tags: + - "v*" + +jobs: + + build_wheel: + runs-on: docker + steps: + - uses: https://code.forgejo.org/actions/checkout@v4 + - name: Build Python wheel + run: | + apt update; apt install -y python3-pip + pip3 install --break-system-packages -e .[test] + python3 setup.py egg_info bdist_wheel + - uses: https://git.kabelsalat.ch/s3lph/forgejo-action-wheel-package-upload@v3 + with: + username: ${{ secrets.API_USERNAME }} + password: ${{ secrets.API_PASSWORD }} + + build_debian: + runs-on: docker + steps: + - uses: https://code.forgejo.org/actions/checkout@v4 + - uses: https://git.kabelsalat.ch/s3lph/forgejo-action-python-debian-package@v5 + with: + python_module: icalendar_timeseries_server + package_name: icalendar-timeseries-server + package_root: package/debian/icalendar-timeseries-server + package_output_path: package/debian + - uses: https://git.kabelsalat.ch/s3lph/forgejo-action-debian-package-upload@v2 + with: + username: ${{ secrets.API_USERNAME }} + password: ${{ secrets.API_PASSWORD }} + deb: "package/debian/*.deb" diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml new file mode 100644 index 0000000..238f155 --- /dev/null +++ b/.forgejo/workflows/test.yml @@ -0,0 +1,27 @@ +--- + +on: push + +jobs: + + test: + runs-on: docker + steps: + - uses: https://code.forgejo.org/actions/checkout@v4 + - name: test + run: | + apt update; apt install --yes python3-pip + pip3 install --break-system-packages -e .[test] + python3 -m coverage run --rcfile=setup.cfg -m unittest discover icalendar_timeseries_server + python3 -m coverage combine + python3 -m coverage report --rcfile=setup.cfg + + codestyle: + runs-on: docker + steps: + - uses: https://code.forgejo.org/actions/checkout@v4 + - name: codestyle + run: | + apt update; apt install --yes python3-pip + pip3 install --break-system-packages -e .[test] + pycodestyle icalendar_timeseries_server diff --git a/.woodpecker.yml b/.woodpecker.yml index 7039b14..e69de29 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,95 +0,0 @@ ---- - -steps: - - test: - image: python:3.11-bookworm - group: test - commands: - - pip3 install -e .[test] - - python3 -m coverage run --rcfile=setup.cfg -m unittest discover icalendar_timeseries_server - - codestyle: - image: python:3.11-bookworm - group: test - commands: - - pip3 install -e .[test] - - pycodestyle icalendar_timeseries_server - - coverage: - image: python:3.11-bookworm - group: integration - commands: - - pip3 install -e .[test] - - python3 -m coverage combine - - python3 -m coverage report --rcfile=setup.cfg - - build_wheel: - image: python:3.11-bookworm - group: package - when: - - event: tag - secrets: - - GITEA_API_REPOSITORY_PYPI - - GITEA_API_USERNAME - - GITEA_API_PASSWORD - commands: - - pip3 install -e .[test] - - python3 setup.py egg_info bdist_wheel - - | - cat > ~/.pypirc <" | grep -B 1000 "<"'!'"-- END CHANGES $${version} -->" | tail -n +2 | head -n -1 | sed -re 's/^-/ */g' - echo -e "\n -- s3lph $(date -R)\n" - done) > package/debian/icalendar-timeseries-server/usr/share/doc/icalendar-timeseries-server/changelog - - gzip -9n package/debian/icalendar-timeseries-server/usr/share/doc/icalendar-timeseries-server/changelog - - python3 setup.py egg_info install --root=package/debian/icalendar-timeseries-server/ --prefix=/usr --optimize=1 - - cd package/debian - - sed -re "s/__ITS_VERSION__/$${ITS_VERSION}/g" -i icalendar-timeseries-server/DEBIAN/control - - mkdir -p icalendar-timeseries-server/usr/lib/python3/dist-packages/ - - rsync -a icalendar-timeseries-server/usr/lib/python3.11/site-packages/ icalendar-timeseries-server/usr/lib/python3/dist-packages/ - - rm -rf icalendar-timeseries-server/usr/lib/python3.11/site-packages - - find icalendar-timeseries-server/usr/lib/python3/dist-packages -name __pycache__ -exec rm -r {} \; 2>/dev/null || true - - find icalendar-timeseries-server/usr/lib/python3/dist-packages -name '*.pyc' -exec rm {} \; - - find icalendar-timeseries-server/usr/lib/python3/dist-packages -name '*.pyo' -exec rm {} \; - - sed -re 's$#!/usr/local/bin/python3$#!/usr/bin/python3$' -i icalendar-timeseries-server/usr/bin/icalendar-timeseries-server - - find icalendar-timeseries-server -type f -exec chmod 0644 {} \; - - find icalendar-timeseries-server -type d -exec chmod 755 {} \; - - >- - chmod +x - icalendar-timeseries-server/usr/bin/icalendar-timeseries-server - icalendar-timeseries-server/DEBIAN/postinst - icalendar-timeseries-server/DEBIAN/prerm - icalendar-timeseries-server/DEBIAN/postrm - - dpkg-deb --build icalendar-timeseries-server - - mv icalendar-timeseries-server.deb "icalendar-timeseries-server_$${ITS_VERSION}-1_all.deb" - - sudo -u nobody lintian "icalendar-timeseries-server_$${ITS_VERSION}-1_all.deb" || true - - >- - curl - --user "$${GITEA_API_USERNAME}:$${GITEA_API_PASSWORD}" - --upload-file "icalendar-timeseries-server_$${ITS_VERSION}-1_all.deb" - $${GITEA_API_REPOSITORY_DEB} diff --git a/CHANGELOG.md b/CHANGELOG.md index 910bb28..f33a665 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,17 @@ # iCalendar Timeseries Server Changelog + +## Version 0.6.3 + +### Changes + + +- Migration from Woodpecker to Forgejo Actions. + + + + ## Version 0.6.2 @@ -8,7 +19,6 @@ - Migration from Gitlab-CI to Woodpecker - diff --git a/icalendar_timeseries_server/__init__.py b/icalendar_timeseries_server/__init__.py index 6808c70..6df2f49 100644 --- a/icalendar_timeseries_server/__init__.py +++ b/icalendar_timeseries_server/__init__.py @@ -1,2 +1,2 @@ -__version__ = '0.6.2' +__version__ = '0.6.3' diff --git a/package/debian/icalendar-timeseries-server/DEBIAN/control b/package/debian/icalendar-timeseries-server/DEBIAN/control index c47eafc..18b9a7d 100644 --- a/package/debian/icalendar-timeseries-server/DEBIAN/control +++ b/package/debian/icalendar-timeseries-server/DEBIAN/control @@ -1,5 +1,5 @@ Package: icalendar-timeseries-server -Version: __ITS_VERSION__ +Version: __VERSION__ Maintainer: s3lph Section: web Priority: optional