diff --git a/tag_publish/cli.py b/tag_publish/cli.py index 7305fb1..dbdcfb2 100644 --- a/tag_publish/cli.py +++ b/tag_publish/cli.py @@ -290,6 +290,8 @@ def _handle_docker_publish( success = True docker_config = config.get("docker", {}) if docker_config: + sys.stdout.flush() + sys.stderr.flush() if docker_config.get("auto_login", tag_publish.configuration.DOCKER_AUTO_LOGIN_DEFAULT): subprocess.run( [ diff --git a/tag_publish/publish.py b/tag_publish/publish.py index 3435980..3a47933 100644 --- a/tag_publish/publish.py +++ b/tag_publish/publish.py @@ -142,18 +142,17 @@ def node( is_github = repo_config["server"] == "npm.pkg.github.com" old_npmrc = None npmrc_filename = os.path.expanduser("~/.npmrc") - env = {**os.environ} if is_github: old_npmrc = None if os.path.exists(npmrc_filename): with open(npmrc_filename, encoding="utf-8") as open_file: old_npmrc = open_file.read() with open(npmrc_filename, "w", encoding="utf-8") as open_file: + open_file.write(f"//npm.pkg.github.com/:_authToken={os.environ['GITHUB_TOKEN']}\n") open_file.write(f"registry=https://{repo_config['server']}\n") open_file.write("always-auth=true\n") - env["NODE_AUTH_TOKEN"] = os.environ["GITHUB_TOKEN"] - subprocess.run(["npm", "publish", *([] if publish else ["--dry-run"])], cwd=cwd, check=True, env=env) + subprocess.run(["npm", "publish", *([] if publish else ["--dry-run"])], cwd=cwd, check=True) if is_github: if old_npmrc is None: