diff --git a/docs/dev_release.md b/docs/dev_release.md index b3e93795..05a39750 100644 --- a/docs/dev_release.md +++ b/docs/dev_release.md @@ -2,7 +2,7 @@ A PyPDFForm release starts with the following steps: -* A release [issue](https://github.com/chinapandaman/PyPDFForm/issues/646) and [PR](https://github.com/chinapandaman/PyPDFForm/pull/647). +* A release [issue](https://github.com/chinapandaman/PyPDFForm/issues/686) and [PR](https://github.com/chinapandaman/PyPDFForm/pull/687). * A new [GitHub release](https://github.com/chinapandaman/PyPDFForm/releases) with auto-generated changelogs. Once these steps are done, the CI for deployment will be triggered. diff --git a/scripts/create_release.py b/scripts/create_release.py index bfe18652..de980291 100644 --- a/scripts/create_release.py +++ b/scripts/create_release.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- """Creates a GitHub release.""" +import os import re import sys from getpass import getpass @@ -17,7 +18,13 @@ sys.exit(f"v{latest_version} is already deployed.") print(f"Bumping to: v{version}") - token = getpass("Enter GitHub Token: ") + token = os.environ.get("GITHUB_TOKEN") + if not token: + token = getpass("Enter GitHub Token: ") + else: + cont = input("Enter Yes to continue: ") + if cont != "Yes": + sys.exit("Aborted.") url = "https://api.github.com/repos/chinapandaman/PyPDFForm/releases" headers = {