tudat-team / tudat

A C++ platform to perform astrodynamics and space research.
BSD 3-Clause "New" or "Revised" License
17 stars 28 forks source link

Nightly bump version workflow #246

Closed niketagrawal closed 1 month ago

niketagrawal commented 1 month ago

This GitHub actions workflow runs daily at 3:00 AM and does the following if there has been new commit(s) on the develop branch of tudat in the last 24 hours:

  1. Bump dev version: dev field of the version number in the files version and .bumpversion.cfg will be bumped by 1. This will result in a new commit.
  2. Create a tag with the above version, and push the tag and the commit to the tudat develop branch
  3. Bump dev version in tudat-feedstock: dev field of the version number in recipe/meta.yml and .bumpversion.cfg will be bumped by 1. This will result in a new commit.
  4. Create a tag with the above version, and push the tag and the commit to the tudat-feedstock develop branch

This workflow must be present in the master branch because scheduled workflows run only on the default branch, so the PR is opened towards master. This version does not make any changes to the master branch of tudat and tudat-feedstock though. This is controlled by specifying the checkout of develop branch in the workflow. This ensures that the bump version action will be performed on the develop branches.

This pull request should be merged after the changes in the branch https://github.com/tudat-team/tudat-feedstock/tree/11-add-bumpversion-cfg are merged in the develop branch of tudat-feedstock, so the bumpversion operation can be performed successfully in tudat0feedstock.

To do

yiquintero commented 1 month ago

Warnings for this workflow

From the GitHub documentation, workflows that run on a trigger of type schedule (e.g. every night at 3 am) have the following constraints:

In a public repository, scheduled workflows are automatically disabled when no repository activity has occurred in 60 days. For information on re-enabling a disabled workflow, see "Disabling and enabling a workflow."

This warrants no action from our side, but it's good to keep it in mind. Tudat and tudatpy are both very active repos so I don't expect a problem.

When the last user to commit to the cron schedule of a workflow is removed from the organization, the scheduled workflow will be disabled. If a user with write permissions to the repository makes a commit that changes the cron schedule, the scheduled workflow will be reactivated. Note that, in this situation, the workflow is not reactivated by any change to the workflow file; you must alter the cron value and commit this change.

Since @niketagrawal and myself will leave the project at some point, it would be best for @DominicDirkx to make a change to the cron trigger in the workflow file to prevent the workflow from being disabled.