Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
concurrency: release
permissions:
id-token: write
contents: write

steps:
- uses: actions/checkout@v3
Expand All @@ -20,6 +19,19 @@ jobs:
token: ${{ secrets.GH_TOKEN }}

- name: Python Semantic Release
id: release
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GH_TOKEN }}
root_options: "-vv"

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: steps.release.outputs.released == 'true'

- name: Publish to GitHub Releases
uses: python-semantic-release/upload-to-gh-release@main
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.GH_TOKEN }}
root_options: "-vv"
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

## v1.0.1 (2023-07-20)

### Continuous Integration
### Continuous Integration
* ci: Rename workflow file ([`1cfed2d`](https://github.com/sandialabs/reverse_argparse/commit/1cfed2d0bd8833e633f684e717745ac65997d7ad))
* ci: Add conventional commits job ([`c683d7a`](https://github.com/sandialabs/reverse_argparse/commit/c683d7a9adf415f71816b190954cec4f4be3162d))
* ci: Set up semantice-release ([`9f233be`](https://github.com/sandialabs/reverse_argparse/commit/9f233bea255a44c5bb8470330c746ca6a951377e))
Expand Down Expand Up @@ -45,7 +45,7 @@
* chore: Add VS Code settings ([`cc4edb2`](https://github.com/sandialabs/reverse_argparse/commit/cc4edb2611ed25a8a90751c03c8f69c8221db642))
* chore: Add __pycache__ to .gitignore ([`48a8acd`](https://github.com/sandialabs/reverse_argparse/commit/48a8acd77bad6b83a735b0540b5b184920715da9))

### Continuous Integration
### Continuous Integration
* ci: Remove documentation jobs ([`81ab9c2`](https://github.com/sandialabs/reverse_argparse/commit/81ab9c230c3a19c8268b878c6e9364e3e1882266))

Let ReadTheDocs test the PR instead.
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,14 @@ python = ">=3.8"


[tool.semantic_release]
build_command = "python3 -m pip install poetry && poetry build"
commit_message = """
{version}
chore: Release v{version}
Automatically generated by python-semantic-release."""
version_variables = [
"doc/source/conf.py:version",
"reverse_argparse/__init__.py:__version__",
]
version_toml = [
"pyproject.toml:tool.poetry.version",
Expand Down
2 changes: 1 addition & 1 deletion reverse_argparse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
from .reverse_argparse import ReverseArgumentParser, quote_arg_if_necessary

__all__ = ["ReverseArgumentParser", "quote_arg_if_necessary"]
__version__ = "1.0.0"
__version__ = "1.0.1"
4 changes: 2 additions & 2 deletions templates/CHANGELOG.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% if context.history.unreleased | length > 0 %}
## Unreleased
{% for type_, commits in context.history.unreleased | dictsort %}
### {{ type_ | capitalize if type_ != "ci" else "Continuous Integration "}}
### {{ type_ | capitalize if type_ != "ci" else "Continuous Integration" }}
{% for commit in commits -%}
{%- set summary = commit.message.rstrip().splitlines()[0] -%}
{%- set details = commit.message.rstrip().splitlines()[2:] -%}
Expand All @@ -18,7 +18,7 @@
{% for version, release in context.history.released.items() -%}
## {{ version.as_tag() }} ({{ release.tagged_date.strftime("%Y-%m-%d") }})
{% for type_, commits in release["elements"] | dictsort %}
### {{ type_ | capitalize if type_ != "ci" else "Continuous Integration "}}
### {{ type_ | capitalize if type_ != "ci" else "Continuous Integration" }}
{% for commit in commits -%}
{%- set summary = commit.message.rstrip().splitlines()[0] -%}
{%- set details = commit.message.rstrip().splitlines()[2:] -%}
Expand Down
11 changes: 11 additions & 0 deletions templates/release_notes.md.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# {{ version.as_tag() }} ({{ release.tagged_date.strftime("%Y-%m-%d") }})
{% for type_, commits in release["elements"] | dictsort %}
## {{ type_ | capitalize if type_ != "ci" else "Continuous Integration" }}
{% for commit in commits -%}
{%- set summary = commit.message.rstrip().splitlines()[0] -%}
{%- set details = commit.message.rstrip().splitlines()[2:] -%}
* {{ summary }} ([`{{ commit.hexsha[:7] }}`]({{ commit.hexsha | commit_hash_url }}))
{% if details %}
{% for line in details %}{% if line.strip() %} {{ line }}{% endif %}
{% endfor %}{% endif %}{% endfor -%}
{% endfor %}