Skip to content
This repository has been archived by the owner on Jun 23, 2020. It is now read-only.

Commit

Permalink
Run 'git push' (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
brettcannon authored Mar 30, 2020
1 parent 949a437 commit d8a2204
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions release_often/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,21 @@ def build():
return output_dir


GIT = "/usr/bin/git"


def commit(new_version):
os.chdir(actions.workspace())
subprocess.run("which git", shell=True)
subprocess.run(
["/usr/bin/git", "config", "--local", "user.email", "action@github.com"],
check=True,
[GIT, "config", "--local", "user.email", "action@github.com"], check=True,
)
subprocess.run(
["/usr/bin/git", "config", "--local", "user.name", "GitHub Action"], check=True,
[GIT, "config", "--local", "user.name", "GitHub Action"], check=True,
)
subprocess.run(
["/usr/bin/git", "commit", "-a", "-m", f"Updates for v{new_version}"],
check=True,
[GIT, "commit", "-a", "-m", f"Updates for v{new_version}"], check=True,
)
subprocess.run([GIT, "push"], check=True)


if __name__ == "__main__":
Expand Down

0 comments on commit d8a2204

Please sign in to comment.