mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-26 10:40:54 +00:00
941f4097fe
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
30 lines
No EOL
778 B
Python
30 lines
No EOL
778 B
Python
import datetime
|
|
import sys
|
|
|
|
from amplitude_python_sdk.v2.clients.releases_client import ReleasesAPIClient
|
|
from amplitude_python_sdk.v2.models.releases import Release
|
|
|
|
|
|
def main():
|
|
version = sys.argv[1]
|
|
version = version.removeprefix("v")
|
|
|
|
api_key = sys.argv[2]
|
|
secret_key = sys.argv[3]
|
|
|
|
current_datetime = datetime.datetime.now(datetime.timezone.utc)
|
|
current_datetime = current_datetime.strftime("%Y-%m-%d %H:%M:%S")
|
|
|
|
release = Release(
|
|
title=version,
|
|
version=version,
|
|
release_start=current_datetime,
|
|
created_by="GitHub Release Workflow",
|
|
chart_visibility=True
|
|
)
|
|
|
|
ReleasesAPIClient(api_key=api_key, secret_key=secret_key).create(release)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main() |