From b153f37737c267f25fb730bb8819c4f9e942ff2d Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Tue, 30 May 2023 23:05:53 +0100 Subject: [PATCH] GHA: Publish release notes when cutting new release (#193) --- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++-- pyproject.toml | 8 ++++---- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e5136a..215a24a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,9 +4,13 @@ name: CI on: push: - branches: [main] + branches: + - main + tags: + - "v*" pull_request: - branches: [main] + branches: + - "*" jobs: @@ -102,3 +106,21 @@ jobs: name: Screenshots-${{env.IMAGE_NAME}}-${{ matrix.tag }}-${{ matrix.browser }} path: screenshots/ if-no-files-found: error + + release: + if: >- + github.repository == 'ispg-group/aiidalab-ispg' + && github.ref_type == 'tag' + + needs: [pre-commit, test-app] + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + contents: write + + steps: + - uses: softprops/action-gh-release@v0.1.15 + name: Create release + if: startsWith(github.ref, 'refs/tags/v') + with: + generate_release_notes: true diff --git a/pyproject.toml b/pyproject.toml index 80fd2a0..15e047a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,8 +40,8 @@ target-version = "py39" ignore = ["E501", "S101", "PT004", "PTH123"] [tool.bumpver] -current_version = "0.2.0a3" -version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]" +current_version = "v0.2.0a3" +version_pattern = "vMAJOR.MINOR.PATCH[PYTAGNUM]" commit_message = "bump version {old_version} -> {new_version}" commit = true tag = true @@ -52,8 +52,8 @@ push = true 'current_version = "{version}"', ] "setup.cfg" = [ - 'version = {version}', + 'version = {pep440_version}', ] "aiidalab_ispg/__init__.py" = [ - '__version__ = "{version}"', + '__version__ = "{pep440_version}"', ]