diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2d5eb98d..b0ef2f51 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -191,9 +191,13 @@ jobs: pypi-publish: - # https://github.community/t/is-it-possible-to-require-all-github-actions-tasks-to-pass-without-enumerating-them/117957/4?u=graingert name: Check tag and publish + # Only trigger this for tag changes. + if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write needs: - build @@ -211,7 +215,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.11 - name: Install dependencies run: | @@ -222,15 +226,11 @@ jobs: run: ls --recursive dist/ - name: Check matched tag version and branch version - on tag - if: startsWith(github.ref, 'refs/tags/') run: python admin/check_tag_version_match.py "${{ github.ref }}" - name: Publish to PyPI - on tag - if: startsWith(github.ref, 'refs/tags/') - uses: pypa/gh-action-pypi-publish@37f50c210e3d2f9450da2cd423303d6a14a6e29f - with: - password: ${{ secrets.PYPI_TOKEN }} - verbose: true + uses: pypa/gh-action-pypi-publish@a56da0b891b3dc519c7ee3284aff1fad93cc8598 + coverage: name: Combine & check coverage. @@ -281,12 +281,12 @@ jobs: needs: # This is the list of CI job that we are interested to be green before # a merge. + # pypi-publish is skipped since this is only executed for a tag. - build - test-linux - test-windows - coverage - check - - pypi-publish steps: - name: Require all successes uses: re-actors/alls-green@3a2de129f0713010a71314c74e33c0e3ef90e696 diff --git a/NEWS.rst b/NEWS.rst index 3329471a..26a6ad7c 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -1,7 +1,58 @@ +Release notes +############# + ``towncrier`` issues are filed on `GitHub `_, and each ticket number here corresponds to a closed GitHub issue. .. towncrier release notes start +towncrier 23.6.0 (2023-06-06) +============================= + +This is the last release to support Python 3.7. + + +Features +-------- + +- Make ``towncrier create`` use the fragment counter rather than failing + on existing fragment names. + + For example, if there is an existing fragment named ``123.feature``, + then ``towncrier create 123.feature`` will now create a fragment + named ``123.feature.1``. (`#475 `_) +- Provide a default Markdown template if the configured filename ends with ``.md``. + + The Markdown template uses the same rendered format as the default *reStructuredText* template, but with a Markdown syntax. (`#483 `_) +- Towncrier no longer depends on setuptools & uses importlib.resources (or its backport) instead. (`#496 `_) +- Added pre-commit hooks for checking and updating news in projects using pre-commit. (`#498 `_) +- Calling ``towncrier check`` without an existing configuration, will just show only an error message. + + In previous versions, a traceback was generated instead of the error message. (`#501 `_) + + +Bugfixes +-------- + +- Fix creating fragment in a section not adding random characters. + + For example, ``towncrier create some_section/+.feature`` should end up as a fragment named something like ``news/some_section/+a4e22da1.feature``. (`#468 `_) +- Fix the ReadTheDocs build for ``towncrier`` which was broken due to the python version in use being 3.8. Upgrade to 3.11. (`#509 `_) + + +Improved Documentation +---------------------- + +- Moved man page to correct section (`#470 `_) +- Update link to Quick Start in configuration.html to point to Tutorial instead. (`#504 `_) +- Add a note about the build command's ``--version`` requiring the command to be explicitly passed. (`#511 `_) +- Fix typos in the Pre-Commit docs. (`#512 `_) + + +Misc +---- + +- `#459 `_, `#462 `_, `#472 `_, `#485 `_, `#486 `_, `#487 `_, `#488 `_, `#495 `_, `#497 `_, `#507 `_, `#1117 `_, `#513 `_ + towncrier 22.12.0 (2022-12-21) ============================== @@ -324,7 +375,7 @@ Misc towncrier 17.1.0 -========== +================ Bugfixes -------- @@ -333,7 +384,7 @@ Bugfixes towncrier 16.12.0 -========== +================= Bugfixes -------- diff --git a/docs/index.rst b/docs/index.rst index 4bb31802..975373dd 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -33,6 +33,7 @@ Development .. toctree:: :maxdepth: 1 + release-notes contributing release GitHub Repository diff --git a/docs/release-notes.rst b/docs/release-notes.rst new file mode 100644 index 00000000..291074a1 --- /dev/null +++ b/docs/release-notes.rst @@ -0,0 +1 @@ +.. include:: ../NEWS.rst diff --git a/src/towncrier/_version.py b/src/towncrier/_version.py index a2529bf2..7b50856e 100644 --- a/src/towncrier/_version.py +++ b/src/towncrier/_version.py @@ -8,7 +8,7 @@ from incremental import Version -__version__ = Version("towncrier", 22, 12, 1, dev=0) +__version__ = Version("towncrier", 23, 6, 1, dev=0) # The version is exposed in string format to be # available for the hatching build tools. _hatchling_version = __version__.short() diff --git a/src/towncrier/newsfragments/+docs-compare-with.misc b/src/towncrier/newsfragments/+docs-compare-with.misc deleted file mode 100644 index 7bc6ec73..00000000 --- a/src/towncrier/newsfragments/+docs-compare-with.misc +++ /dev/null @@ -1 +0,0 @@ -Fix a minor typo in the example git CLI option flag. diff --git a/src/towncrier/newsfragments/1117.misc b/src/towncrier/newsfragments/1117.misc deleted file mode 100644 index e69de29b..00000000 diff --git a/src/towncrier/newsfragments/459.misc b/src/towncrier/newsfragments/459.misc deleted file mode 100644 index cb7b3c0d..00000000 --- a/src/towncrier/newsfragments/459.misc +++ /dev/null @@ -1,2 +0,0 @@ -Added a link to the GitHub repository on the landing page of the -documentation, and renamed the link for the release notes. diff --git a/src/towncrier/newsfragments/462.misc b/src/towncrier/newsfragments/462.misc deleted file mode 100644 index e69de29b..00000000 diff --git a/src/towncrier/newsfragments/468.bugfix b/src/towncrier/newsfragments/468.bugfix deleted file mode 100644 index 8bac0340..00000000 --- a/src/towncrier/newsfragments/468.bugfix +++ /dev/null @@ -1,3 +0,0 @@ -Fix creating fragment in a section not adding random characters. - -For example, ``towncrier create some_section/+.feature`` should end up as a fragment named something like ``news/some_section/+a4e22da1.feature``. diff --git a/src/towncrier/newsfragments/470.doc b/src/towncrier/newsfragments/470.doc deleted file mode 100644 index 4173a893..00000000 --- a/src/towncrier/newsfragments/470.doc +++ /dev/null @@ -1 +0,0 @@ -Moved man page to correct section diff --git a/src/towncrier/newsfragments/472.misc b/src/towncrier/newsfragments/472.misc deleted file mode 100644 index e69de29b..00000000 diff --git a/src/towncrier/newsfragments/475.feature b/src/towncrier/newsfragments/475.feature deleted file mode 100644 index aac86074..00000000 --- a/src/towncrier/newsfragments/475.feature +++ /dev/null @@ -1,6 +0,0 @@ -Make ``towncrier create`` use the fragment counter rather than failing -on existing fragment names. - -For example, if there is an existing fragment named ``123.feature``, -then ``towncrier create 123.feature`` will now create a fragment -named ``123.feature.1``. diff --git a/src/towncrier/newsfragments/483.feature b/src/towncrier/newsfragments/483.feature deleted file mode 100644 index 3397d34b..00000000 --- a/src/towncrier/newsfragments/483.feature +++ /dev/null @@ -1,3 +0,0 @@ -Provide a default Markdown template if the configured filename ends with ``.md``. - -The Markdown template uses the same rendered format as the default *reStructuredText* template, but with a Markdown syntax. diff --git a/src/towncrier/newsfragments/485.misc b/src/towncrier/newsfragments/485.misc deleted file mode 100644 index e69de29b..00000000 diff --git a/src/towncrier/newsfragments/486.misc b/src/towncrier/newsfragments/486.misc deleted file mode 100644 index e69de29b..00000000 diff --git a/src/towncrier/newsfragments/487.misc b/src/towncrier/newsfragments/487.misc deleted file mode 100644 index ddbc7205..00000000 --- a/src/towncrier/newsfragments/487.misc +++ /dev/null @@ -1 +0,0 @@ -Do not echo 'Removing...' if the files are to be kept diff --git a/src/towncrier/newsfragments/488.misc b/src/towncrier/newsfragments/488.misc deleted file mode 100644 index 59a0c584..00000000 --- a/src/towncrier/newsfragments/488.misc +++ /dev/null @@ -1 +0,0 @@ -Added help output for `build`'s `--date` option. diff --git a/src/towncrier/newsfragments/495.misc b/src/towncrier/newsfragments/495.misc deleted file mode 100644 index e69de29b..00000000 diff --git a/src/towncrier/newsfragments/496.feature b/src/towncrier/newsfragments/496.feature deleted file mode 100644 index ef8556a6..00000000 --- a/src/towncrier/newsfragments/496.feature +++ /dev/null @@ -1 +0,0 @@ -Towncrier no longer depends on setuptools & uses importlib.resources (or its backport) instead. diff --git a/src/towncrier/newsfragments/497.misc b/src/towncrier/newsfragments/497.misc deleted file mode 100644 index e69de29b..00000000 diff --git a/src/towncrier/newsfragments/498.feature b/src/towncrier/newsfragments/498.feature deleted file mode 100644 index 364eda0d..00000000 --- a/src/towncrier/newsfragments/498.feature +++ /dev/null @@ -1 +0,0 @@ -Added pre-commit hooks for checking and updating news in projects using pre-commit. diff --git a/src/towncrier/newsfragments/501.feature b/src/towncrier/newsfragments/501.feature deleted file mode 100644 index c8e36365..00000000 --- a/src/towncrier/newsfragments/501.feature +++ /dev/null @@ -1,3 +0,0 @@ -Calling ``towncrier check`` without an existing configuration, will just show only an error message. - -In previous versions, a traceback was generated instead of the error message. diff --git a/src/towncrier/newsfragments/504.doc b/src/towncrier/newsfragments/504.doc deleted file mode 100644 index 341f4a94..00000000 --- a/src/towncrier/newsfragments/504.doc +++ /dev/null @@ -1 +0,0 @@ -Update link to Quick Start in configuration.html to point to Tutorial instead. diff --git a/src/towncrier/newsfragments/507.misc b/src/towncrier/newsfragments/507.misc deleted file mode 100644 index b8f04783..00000000 --- a/src/towncrier/newsfragments/507.misc +++ /dev/null @@ -1 +0,0 @@ -A friendly message is now provided, when it's necessary to pass the ``--version`` option explicitly. diff --git a/src/towncrier/newsfragments/509.bugfix b/src/towncrier/newsfragments/509.bugfix deleted file mode 100644 index 1488577d..00000000 --- a/src/towncrier/newsfragments/509.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fix the ReadTheDocs build for ``towncrier`` which was broken due to the python version in use being 3.8. Upgrade to 3.11. diff --git a/src/towncrier/newsfragments/511.doc b/src/towncrier/newsfragments/511.doc deleted file mode 100644 index a7d3e9cc..00000000 --- a/src/towncrier/newsfragments/511.doc +++ /dev/null @@ -1 +0,0 @@ -Add a note about the build command's ``--version`` requiring the command to be explicitly passed. diff --git a/src/towncrier/newsfragments/512.doc b/src/towncrier/newsfragments/512.doc deleted file mode 100644 index 03742030..00000000 --- a/src/towncrier/newsfragments/512.doc +++ /dev/null @@ -1 +0,0 @@ -Fix typos in the Pre-Commit docs. diff --git a/src/towncrier/newsfragments/513.doc b/src/towncrier/newsfragments/513.doc deleted file mode 100644 index e69de29b..00000000