diff --git a/.travis.yml b/.travis.yml index e3edbfe9b..35ca8a69c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -80,9 +80,9 @@ jobs: addons: apt: packages: - # required by publish_gh_release_notes + # required by publish-gh-release-notes - pandoc - after_deploy: tox -e publish_gh_release_notes + after_deploy: tox -e publish-gh-release-notes deploy: provider: pypi user: nicoddemus diff --git a/scripts/publish_gh_release_notes.py b/scripts/publish-gh-release-notes.py similarity index 94% rename from scripts/publish_gh_release_notes.py rename to scripts/publish-gh-release-notes.py index 23f7b40ad..34ccaa63d 100644 --- a/scripts/publish_gh_release_notes.py +++ b/scripts/publish-gh-release-notes.py @@ -6,7 +6,13 @@ This script is meant to be executed after a successful deployment in Travis. Uses the following environment variables: * GIT_TAG: the name of the tag of the current commit. -* GH_RELEASE_NOTES_TOKEN: a personal access token with 'repo' permissions. It should be encrypted using: +* GH_RELEASE_NOTES_TOKEN: a personal access token with 'repo' permissions. + + Create one at: + + https://github.com/settings/tokens + + It should be encrypted using: $travis encrypt GH_RELEASE_NOTES_TOKEN= -r pytest-dev/pytest @@ -33,7 +39,7 @@ def publish_github_release(slug, token, tag_name, body): def parse_changelog(tag_name): - p = Path(__file__).parent.parent / "CHANGELOG.rst" + p = Path(__file__).parent.parent / "doc/en/changelog.rst" changelog_lines = p.read_text(encoding="UTF-8").splitlines() title_regex = re.compile(r"pytest (\d\.\d+\.\d+) \(\d{4}-\d{2}-\d{2}\)") diff --git a/tox.ini b/tox.ini index 71f795316..d33a62224 100644 --- a/tox.ini +++ b/tox.ini @@ -127,7 +127,7 @@ deps = towncrier commands = python scripts/release.py {posargs} -[testenv:publish_gh_release_notes] +[testenv:publish-gh-release-notes] description = create GitHub release after deployment basepython = python3 usedevelop = True @@ -135,7 +135,7 @@ passenv = GH_RELEASE_NOTES_TOKEN TRAVIS_TAG TRAVIS_REPO_SLUG deps = github3.py pypandoc -commands = python scripts/publish_gh_release_notes.py +commands = python scripts/publish-gh-release-notes.py {posargs} [pytest]