OpenEnergyPlatform / ontology

Repository for the Open Energy Ontology (OEO)
Creative Commons Zero v1.0 Universal
111 stars 23 forks source link

Automatically attach the required files to releases #1956

Closed ColinHDev closed 2 weeks ago

ColinHDev commented 1 month ago

Summary of the discussion

As described in https://github.com/OpenEnergyPlatform/ontology/pull/1955, the Release workflow currently requires that an oeo-closure.owl file present in the build-files.zip artifact to be attached to a release. However that pull request would remove said file from the artifacts for a reduced completion time of workflow runs.

This Pr tries to automate the release workflow. Instead of a maintainer going to the workflow artifacts of two separate runs to download the build-files.zip and existing-terms-and-definitions.zip and create a release with them, the maintainer would now only have to write and publish the release and this workflow would then automatically attach said files.

However, I am not really able to test this easily. But even if the automation fails, this pr ensures that a version of build-files.zip is uploaded that contains the oeo-closure.zip file, so the maintainer can add it automatically.

Type of change (CHANGELOG.md)

---

Workflow checklist

Automation

Closes #

PR-Assignee

Reviewer

stap-m commented 1 month ago

@jh-RLI could you please also take a look at this PR?

stap-m commented 3 weeks ago

Looks good to me. However, I don't get every single command... @jh-RLI could you please also review with respect to https://github.com/OpenEnergyPlatform/oeplatform/pull/1791

ColinHDev commented 2 weeks ago

Hi, sorry for the late response. This looks very promising. Maybe for the next release you could do a "vX.X.X-pre" release to test this workflow? From looking at the workflow file, everything seems correct. The resulting artifacts should be reviewed at least once.

For the OpenEnergyPlatform it is important to have at least the structure & files available that are also in the current build-files.zip for v2.5.0. If something changes, let me know. The OEP attempts to read the files / provides them for download.

The file structure should be the same, as I took the steps that build them from the other workflow. But checking whether everything is correct with a pre-release is definitely the best approach!

However, there will be a delay of about 10 to 15 minutes before the files are built. Previously, the person writing the release just had to download the files and attach them to the release, making them available at the same time the release was published. Now, the files first have to be built which is only triggered after the release is published. But I don't know whether that needs to be considered for the OEP.

jh-RLI commented 2 weeks ago

Thanks @ColinHDev for the hint. This is not a problem, currently the OEO version in OEP has to be updated manually as well, as we can't really communicate with Github via the OEP web server for security reasons. As there is no timeing dependent process implemented that fails if the files are only available some time after release, this is not an issue that is currently bothering us :)