This template is designed to automate the creation of weekly releases. It is based on the TARDIS Collaboration release pipeline, with a number of simplifications.
Publishes a new release every Sunday at 00:00 UTC using calendar versioning by default.
-
Copy the files in this repository to your own. Everything except README.md is required.
-
Add configuration for
git-cliffto use your preferred changelog format. The default is Conventional Commits. See https://git-cliff.org/docs/. -
Connect your repository on Zenodo, see https://help.zenodo.org/docs/github/.
-
Make sure you have a reserved DOI on Zenodo by making a manual release. When creating the release tag, make sure it looks like
release-vXXX.XX.XXwhere the Xs are a date. Consider adding specific information noting that it is a manual release. -
Replace the DOI of this repository in these files:
-
Test the pipeline by running it using the workflow dispatch trigger on the pre-release workflow.
Note: If your main branch is protected, take a look at the full TARDIS release pipeline, which includes automated reviews with tokens.
The pre-release action clones the current repository, runs the script to
generate a new .zenodo.json file, and pushes it to the root of the repository.
This file is used to create a new version of your software on Zenodo with all committers as authors.
- Check out the repository.
- Store the secret key for the Zenodo API in an environment variable.
- Run the script to generate a new
.zenodo.jsonfile. - Upload the
.zenodo.jsonas an artifact.
Relies on Zenodo step completing.
- Check out the repository.
- Download the artifact from the previous step.
- Checks for
.zenodo.jsonand uses it if it was generated. - Get the current date.
- Push the updated
.zenodo.jsonto the main branch.
Creates a new release on GitHub and Zenodo after the pre-release PR is merged.
- Check out the repository with 0 fetch depth.
- Set up Python.
- Find the next calendar version based on today's date.
- Create a GitHub release that uses the new version as the tag.
- Wait for Zenodo to update the new release of TARDIS (2 min sleep).
- Fetch the new DOI from Zenodo using the Zenodo API, and create a badge.
- Update the release description with the Zenodo badge.
The post-release action updates the changelog, citation and credits in the main repository.
- Check out the repository with 0 fetch depth.
- Get the current release tag
- Generate a changelog with
git-cliff - Upload a CHANGELOG.md file as an artifact.
- Check out the repository.
- Set up Python.
- Install
doi2cff. - Convert the latest release DOI to a CITATION.cff file. Try 10 times with a 60 second sleep between attempts.
- Upload the CITATION.cff file as an artifact.
- Checks out the TARDIS repository.
- Downloads the artifacts from the previous steps.
- Copy the
CHANGELOG.md,CITATION.cfffiles to the repository. - Get the current date.
- Push the changes to the main branch.