|
|
|
@ -69,11 +69,29 @@ class ReleaseService:
|
|
|
|
|
release.release_artifact_token,
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
artifacts_to_attach = []
|
|
|
|
|
for artifact_path in release.release_artifacts:
|
|
|
|
|
self.artifact_deployment_api.calculate_checksums(artifact_path)
|
|
|
|
|
# TODO: make api more explizit to have the path calculation & decision which shas to take clear
|
|
|
|
|
artifacts_to_attach += [{
|
|
|
|
|
"path": artifact_path,
|
|
|
|
|
# TODO: it will not always be a jar file -> move type to release input-side.
|
|
|
|
|
"type": "application/x-java-archive",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"path": f"{artifact_path}.sha256",
|
|
|
|
|
"type": "text/plain",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"path": f"{artifact_path}.sha512",
|
|
|
|
|
"type": "text/plain",
|
|
|
|
|
}]
|
|
|
|
|
|
|
|
|
|
# TODO: use structure created above
|
|
|
|
|
for artifact in artifacts_to_attach:
|
|
|
|
|
self.artifact_deployment_api.add_asset_to_release(
|
|
|
|
|
"todo",
|
|
|
|
|
release_id,
|
|
|
|
|
release.forgejo_release_asset_api_endpoint(release_id),
|
|
|
|
|
"todo",
|
|
|
|
|
"todo",
|
|
|
|
|
release.release_artifact_token,
|
|
|
|
|