Skip to content

Commit

Permalink
Set the used npm registry
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Nov 28, 2024
1 parent e2104ee commit f1ed315
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tag_publish/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ def node(
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['host']}\n")
open_file.write("always-auth=true\n")

subprocess.run(["npm", "set", "registry", f'https://{repo_config["host"]}'], cwd=cwd, check=True)
subprocess.run(["npm", "publish", *([] if publish else ["--dry-run"]), *args], cwd=cwd, check=True)

if is_github:
Expand Down

0 comments on commit f1ed315

Please sign in to comment.