Skip to content

Commit

Permalink
Automate release process with bumpver. (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
yakutovicha authored Aug 18, 2022
1 parent 8bc9848 commit cfd23af
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- name: Install dependencies
run: |
pip install .[pre_commit]
pip install .[dev]
- name: Run pre-commit
run: pre-commit run --all-files || ( git status --short ; git diff ; exit 1 )
15 changes: 15 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Release
on:
push:
tags:
- v*
jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: softprops/[email protected]
name: Create release.
with:
generate_release_notes: true
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@ Users of AiiDAlab are kindly asked to cite the following publication in their ow
A. V. Yakutovich et al., Comp. Mat. Sci. 188, 110165 (2021).
[DOI:10.1016/j.commatsci.2020.110165](https://doi.org/10.1016/j.commatsci.2020.110165)

## For maintainers

To create a new release, clone the repository, install development dependencies with `pip install '.[dev]'`, and then execute `bumpver update`.
This will:

1. Create a tagged release with bumped version and push it to the repository.
2. Trigger a GitHub actions workflow that creates a GitHub release.

Additional notes:

- Use the `--dry` option to preview the release change.
- The release tag (e.g. a/b/rc) is determined from the last release.
Use the `--tag` option to switch the release tag.

## Acknowledgements

This work is supported by the [MARVEL National Centre for Competency in Research](<http://nccr-marvel.ch>)
Expand Down
17 changes: 16 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,26 @@ install_requires =
python_requires = >=3.8

[options.extras_require]
pre_commit =
dev =
bumpver==2022.1118
pre-commit==2.15.0

[flake8]
ignore =
E501 # Line length handled by black.
W503 # Line break before binary operator, preferred formatting for black.
E203 # Whitespace before ':', preferred formatting for black.

[bumpver]
current_version = "v22.08.0"
version_pattern = "v0Y.0M.PATCH[PYTAGNUM]"
commit_message = "Bump version {old_version} -> {new_version}."
commit = True
tag = True
push = True

[bumpver:file_patterns]
home/__init__.py =
__version__ = "{version}"
setup.cfg =
current_version = "{version}"

0 comments on commit cfd23af

Please sign in to comment.