diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3a4e1b6..0348491 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -63,3 +63,24 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: docs/ publish_branch: streamlit-report-example + + changelog: + name: Update changelog + if: github.event_name == 'release' && github.event.action == 'published' + runs-on: ubuntu-latest + steps: + - name: Checkout main branch + uses: actions/checkout@v4 + with: + ref: main + + - name: Update CHANGELOG.md + uses: rhysd/changelog-from-release/action@v3 + with: + file: CHANGELOG.md + github_token: ${{ secrets.GITHUB_TOKEN }} + header: | + # Release Notes + + All notable changes to this project are documented in this file. It was automatically generated with + the [changelog-from-release](https://github.com/rhysd/changelog-from-release) tool. diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..a3bb7b1 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,4 @@ +# Release Notes + +All notable changes to this project are documented in this file. It was automatically generated with +the [changelog-from-release](https://github.com/rhysd/changelog-from-release) tool. diff --git a/README.md b/README.md index 9a7ea50..ee7ecaa 100644 --- a/README.md +++ b/README.md @@ -406,7 +406,14 @@ Full details for both licenses can be found in the [LICENSE][vuegen-license] fil ## Contributing -VueGen is an open-source project, and we welcome contributions of all kinds via GitHub issues and pull requests. You can report bugs, suggest improvements, propose new features, or implement changes. Please follow the guidelines in the [CONTRIBUTING](CONTRIBUTING.md) file to ensure that your contribution is easily integrated into the project. +VueGen is an open-source project, and we welcome contributions of all kinds via GitHub issues and pull requests. +You can report bugs, suggest improvements, propose new features, or implement changes. + +We follow the [Conventional Commits][conventional-commits] specification for commit messages and use the +[changelog-from-release][changelog-from-release-repo] tool to automatically generate the [CHANGELOG](CHANGELOG.md). + +Please follow the guidelines in the [CONTRIBUTING](CONTRIBUTING.md) file to ensure that your contribution is +easily integrated into the project. ## Credits and acknowledgements @@ -488,6 +495,8 @@ We appreciate your feedback! If you have any comments, suggestions, or run into [st-cloud]: https://streamlit.io/cloud [stlite_repo]: https://github.com/whitphx/stlite [st-forum-exe]: https://discuss.streamlit.io/t/streamlit-deployment-as-an-executable-file-exe-for-windows-macos-and-android/6812 +[conventional-commits]: https://www.conventionalcommits.org/ +[changelog-from-release-repo]: https://github.com/rhysd/changelog-from-release [Mona]: https://multiomics-analytics-group.github.io/ [Biosustain]: https://www.biosustain.dtu.dk/ [scriberia]: https://www.scriberia.co.uk/ diff --git a/docs/index.md b/docs/index.md index e8f8963..804fb2d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -50,6 +50,7 @@ reference/vuegen sections_readme/contributing sections_readme/credits sections_readme/contact +sections_readme/changelog ``` ```{toctree} diff --git a/docs/split_readme.py b/docs/split_readme.py index 1a7211e..8914a47 100644 --- a/docs/split_readme.py +++ b/docs/split_readme.py @@ -106,7 +106,7 @@ def process_readme(readme_path, output_dir): else: raise ValueError(f"Section '{section_title}' not found in README") - # Include CONTRIBUTING.md with its own link references + # Copy CONTRIBUTING.md with its own link references contrib_path = readme_path.parent / "CONTRIBUTING.md" try: raw_contrib = contrib_path.read_text() @@ -124,6 +124,15 @@ def process_readme(readme_path, output_dir): except FileNotFoundError as e: raise FileNotFoundError(f"CONTRIBUTING.md not found at {contrib_path}") from e + # Copy CHANGELOG.md to the output directory + changelog_path = readme_path.parent / "CHANGELOG.md" + try: + raw_changelog = changelog_path.read_text() + (output_dir / "changelog.md").write_text(raw_changelog) + print("Generated changelog.md") + except FileNotFoundError as e: + raise FileNotFoundError(f"CHANGELOG.md not found at {changelog_path}") from e + if __name__ == "__main__": default_readme = Path(__file__).resolve().parent.parent / "README.md"