From 421a532a5d36d03e0a97f8f124420857e1a09893 Mon Sep 17 00:00:00 2001 From: tledoux Date: Fri, 9 Aug 2024 12:28:43 +0200 Subject: [PATCH] feat: Generate release notes --- .github/workflows/build-win-app.yml | 20 +++++-- CHANGELOG.md | 87 +++++++++++++++++++++++++++++ CONTRIBUTING.md | 59 +++++++++++++++++++ README.md | 8 ++- dialog_utils.py | 4 +- donate_gui.py | 2 +- file_version_info.txt | 8 +-- 7 files changed, 174 insertions(+), 14 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 CONTRIBUTING.md diff --git a/.github/workflows/build-win-app.yml b/.github/workflows/build-win-app.yml index d9a6f30..c7048b8 100644 --- a/.github/workflows/build-win-app.yml +++ b/.github/workflows/build-win-app.yml @@ -15,17 +15,23 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - build: [x86_64-linux, x86_64-windows, x86_64-macos] + # See: https://github.com/actions/runner-images?tab=readme-ov-file#available-images + build: [x86_64-linux, x86_64-windows, x86_64-macos] #, arm64-macos include: - build: x86_64-linux os: ubuntu-20.04 target: x86_64-ubuntu-20 + # architecture: 'x64' - build: x86_64-windows os: windows-2019 target: x86_64-windows - build: x86_64-macos os: macos-13 target: x86_64-macos-13 + #- build: arm64-macos + # os: macos-latest + # target: arm_64-darwin + # architecture: 'arm64' steps: - name: Checkout uses: actions/checkout@v4 @@ -66,6 +72,8 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@v4 + - name: Generate RELEASE.md + uses: CSchoel/release-notes-from-changelog@v1 - name: download all artefacts uses: actions/download-artifact@v4 with: @@ -80,15 +88,15 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - generateReleaseNotes: true + #generateReleaseNotes: true + bodyFile: RELEASE.md artifacts: "dist/*" - # TODO until test goes on + #artifactContentType: application/zip draft: false prerelease: false - #artifactContentType: application/zip - name: Generate summary run: | - echo "### Success in release {github.ref}" >> $GITHUB_STEP_SUMMARY - echo "Release url is {steps.create-release.outputs.html_url}" >> $GITHUB_STEP_SUMMARY + echo "### Success in release ${{ github.ref }}" >> $GITHUB_STEP_SUMMARY + echo "Release url is ${{ steps.create-release.outputs.html_url }}" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY # this is a blank line diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..42b2364 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,87 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added + +### Changed + +### Removed + +## [1.3.0] - 2024-08-09 + +### Added + +- Ajout du CHANGELOG +- Ajout du CONTRIBUTING +- Ajout de l'action `release-notes-from-changelog` pour générer les notes de release + +### Changed + +- Explicitation des limites du programme dans le README + +### Removed + +## [1.2.9] - 2024-08-08 + +### Added + +- Utilisation des GitHub Actions pour générer les binaires + +### Changed + +### Removed + +## [1.2.0] - 2024-08-08 + +### Added + +- Passage sur Github pour la gestion du projet + +### Changed + +- Amélioration de l'interface pour les hautes résolutions d'écran +- Meilleure gestion des polices de caractères présentes +- Remplacement des emoji par des images +- Utilisation du module mutf7 sous licence WTFPL pour la gestion de l'encodage _modified UTF-7_ +- Passage en texte du fichier `file_version_info` de description du binaire Windows + +### Removed + +## [1.1.0] - 2024-08-06 + +### Added + +- Ajout de dialog_utils pour centraliser les utilitaires graphiques +- Ajout d'une explication pour les mots de passe applicatifs +- Gestion des préférences utilisateurs + +### Changed + +- Opérations longues portées par des threads séparés pour garder une interface fluide + +### Removed + +## [1.0.0] - 2024-08-04 + +### Added + +- Version initiale de l'IHM +- Serveurs d'IMAP connus +- Récupération des dossiers +- Récupération des courriels d'un dossier +- Création de la livraison + +### Changed + +### Removed + +[Unreleased]: https://github.com/CSchoel/release-notes-from-changelog/compare/v1.3.0..HEAD +[1.3.0]: https://github.com/CSchoel/release-notes-from-changelog/compare/v1.2.9..v1.3.0 +[1.2.9]: https://github.com/CSchoel/release-notes-from-changelog/compare/v1.2.0..v1.3.9 +[1.2.0]: https://github.com/CSchoel/release-notes-from-changelog/releases/tag/v1.2.0 \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..3b68f2d --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,59 @@ +## Contributing + +### General rules + +1. Before writing any *code* take a look at the existing + [issues](https://github.com/tledoux/donatemail/issues?q=). + If none of them is about the changes you want to contribute, open + up a new issue. Fixing a typo requires no issue though, just submit + a Pull Request. + +2. If you're looking for an open issue to fix, check out + labels `help wanted` and `good first issue` on GitHub. + +3. If you plan to work on an issue open not by you, write about your + intention in the comments *before* you start working. + + +### Development rules + +1. Follow the GitHub [fork & pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) flow. + +2. Make changes to the code. + +3. Make sure the pylinter is happy + +4. Open a pull request, refer to the issue you solve. + +5. Make sure GitHub Checks (Actions) pass. + +### Release management + +1. Follow the [SemVer](https://semver.org/) conventions for the release number. +2. Update the version in [file_version_info](https://github.com/tledoux/donatemail/blob/main/file_version_info.txt) and +in [donate_gui](https://github.com/tledoux/donatemail/blob/main/donate_gui.py). +2. Update the [CHANGELOG](https://github.com/tledoux/donatemail/blob/main/CHANGELOG.md). +3. Update the [README](https://github.com/tledoux/donatemail/blob/main/README.md) if needed. +4. Merge the changes to the `main` branch. +5. Push a version-specific tag, e.g. `v2.1.9`: + +``` +$ git tag v2.1.9 +$ git push origin v2.1.9 +``` + +6. Push a new or over a major version tag, e.g. `v2`. + +``` +# Delete the old local tag +$ git tag -d v2 + +# Add a new local tag +$ git tag v2 + +# Delete the old remote tag +$ git push -d origin v2 + +# Push the new remote tag +$ git push origin v2 +``` diff --git a/README.md b/README.md index 874d53a..e7d1126 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,13 @@ L'IHM utilise les icones issues de la collection [Gartoon de wikimedia commons]( Ce programme n'a été testé que sous Windows. -:warning: Attention ce programme nécessite que le port 993 (IMAP SSL) soit ouvert sur votre réseau. +## LIMITATIONS + +:warning: Ce programe ne fonctionne que dans ces conditions : + * le port 993 doit être ouvert sur votre réseau pour permettre l'usage du protocole IMAP SSL, + * il faut généralement créer et utiliser un mot de passe **applicatif** à votre messagerie pour permettre son accès depuis une application tierce comme celle-ci. + + ## RUN Pour lancer l'IHM, faire diff --git a/dialog_utils.py b/dialog_utils.py index 62138c6..72b66a0 100644 --- a/dialog_utils.py +++ b/dialog_utils.py @@ -23,9 +23,9 @@ def prepare_fonts(root, verbose=False): if 1024 < screen_width <= 1440: default_size = 10 elif 1440 < screen_width <= 1920: - default_size = 15 + default_size = 12 elif 1920 < screen_width: - default_size = 18 + default_size = 14 if verbose: print(f"default_size={default_size}") diff --git a/donate_gui.py b/donate_gui.py index ab6037a..0bd7c4b 100644 --- a/donate_gui.py +++ b/donate_gui.py @@ -33,7 +33,7 @@ from mbox_delivery import MboxDelivery from user_pref import UserPreferences -__version__ = "1.2.9" +__version__ = "1.3.0" __appname__ = "donatemail" logger = logging.getLogger(__appname__) diff --git a/file_version_info.txt b/file_version_info.txt index d49684b..ae12849 100644 --- a/file_version_info.txt +++ b/file_version_info.txt @@ -8,8 +8,8 @@ VSVersionInfo( ffi=FixedFileInfo( # filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4) # Set not needed items to zero 0. - filevers=(1, 2, 9, 0), - prodvers=(1, 2, 9, 0), + filevers=(1, 3, 0, 0), + prodvers=(1, 3, 0, 0), # Contains a bitmask that specifies the valid bits 'flags'r mask=0x3F, # Contains a bitmask that specifies the Boolean attributes of the file. @@ -33,12 +33,12 @@ VSVersionInfo( "040904B0", [ StringStruct("FileDescription", "Exécutable Donatemail"), - StringStruct("FileVersion", "1.2.9.0"), + StringStruct("FileVersion", "1.3.0.0"), StringStruct("InternalName", "donatemail"), StringStruct("LegalCopyright", "Copyright © 2024 BnF"), StringStruct("OriginalFilename", "donatemail.exe"), StringStruct("ProductName", "Donatemail"), - StringStruct("ProductVersion", "1.2.9.0"), + StringStruct("ProductVersion", "1.3.0.0"), # StringStruct('Language', 'Language Neutral'), # StringStruct('Language', 'Français (France)'), => 1036 (1033 for English) StringStruct("LegalTrademarks", "BnF"),