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

Implement a nightly bump version automation workflow #232

Closed niketagrawal closed 1 month ago

niketagrawal commented 3 months ago

Create a GitHub action workflow that triggers nightly at a scheduled time and performs the following actions if there is a new commit(s) on the develop branch of tudat in the last 24 hours:

  1. Bump the version number, create a tag, and push the tag and the bump version commit to the develop branch of the tudat repository
  2. Bump the version number, create a tag, and push the tag and the bump version commit to the develop branch of the tudat-feedstock repository

Currently, the above actions happen manually. When the develop branch of tudat is found to have reached a staged where a new version can be created, the tag and the version is created manually, and the version and tag is added on the tudat-feedstock repository, which then triggers the azure pipelines that creates the conda package.

niketagrawal commented 3 months ago

See workflow (in development) here: https://github.com/niketagrawal/tudat/blob/develop/.github/workflows/trigger_creation_new_dev_conda_pkg.yml

niketagrawal commented 3 months ago

Done

Questions

niketagrawal commented 2 months ago

The polling based workflow to detect new commits in tudat dev branch has the following cons:

To do

niketagrawal commented 1 month ago

This GitHub Actions workflow will require personal access token to bump version, create a tag, and push the tag to tudat-feedstock repository. Below are the steps to create a personal access token to use in a Github action:

  1. Go to Github profile -> settings > Developer settings (bottom of the menu on the left corner) > Personal access tokens > tokens (classic).
  2. Generate new token -> tokens classic. Create a new token by adding a description, for example, 'nightly bump version workflow'

This token must now be specified to use in the tudat repository.

  1. Got to tudat repository -> settings > secrets and variables > actions > new repository secret
  2. Name the secret for example, bump_version_nightly. Go to the personal access token created in previous step and copy the token code and paste it as the value of this secret.
  3. Mention this secret name in the bump version github action workflow.