Automate new releases and asciinema Gifs
- Dominant language
- Python
- Stars
- 558
- Forks
- 53
- PR merge metrics
- No merged PRs in 30d
Description
The automated demo on the README is difficult to test right now - we can only tell if there's an error when we try to push a new version, but if there's an error and we push a fix to `previewgif.sh`, if the fix for `previewgif.sh` is on an untagged commit, then GitHub Actions won't even try to generate the automated demo. This is a hassle, and the way to fix this would be to update the CI workflow that triggers when we want to create a new release.
This is what the workflow would look like:
- We update the Git Gud version on our end (modify version.txt)
- We push to GH actions
Here's the skeleton of the GitHub Action that's triggered:
- If GH actions notices that the version number has been updated (via comparing commit files)
- - Generate the asciinema
- - Update asciinema version, which seems to be some kind of generated artifact from CI
- - Create a PR to master
- - merge the PR that we just generated
- If the asciinema_version == version.txt and `version.txt` isn't an actual version
- - Tag the current version
- - Publish to pypi
This is a rough skeleton - there may be some intermediate steps but this is the main gist of it.
There's probably a way to leveraging existing workflows and conditionally running them using the GitHub Action parameter `workflow_run`.
Lastly, I made a StackOverflow post when I first had to create this automated GIF: https://stackoverflow.com/questions/53969566/how-can-i-use-scripting-automation-to-record-asciinema-recordings. This could be helpful if you're tackling this issue. I also discovered a program `terminalizer` much later that might be worth looking into.
Contributor guide
Assessment
This issue has not been assessed yet.