Skip to content

Instantly share code, notes, and snippets.

@Elliria
Last active March 10, 2025 17:03
Show Gist options
  • Save Elliria/2dc56b4b0316d71819666d7bf43b726a to your computer and use it in GitHub Desktop.
Save Elliria/2dc56b4b0316d71819666d7bf43b726a to your computer and use it in GitHub Desktop.
Test RST

Update The Workflows

Update the action versions

  1. Open the .github/workflows directory.
  2. Check the action versions:
    1. Check the build.yml file:
      1. Check if actions/checkout has changed
      2. Check if actions/setup-python has changed
      3. Check if actions/cache has changed
      4. Check if actions/upload-artifact has changed
      5. Check if actions/download-artifact has changed
    2. Check the pages.yml file:
      1. Check if actions/checkout has changed
      2. Check if actions/upload-pages-artifact has changed
      3. Check if actions/deploy-pages has changed
    3. Check the python-test.yml file:
      1. Check if actions/checkout has changed
      2. Check if actions/setup-python has changed
      3. Check if actions/cache has changed
      4. Check if ricardochaves/python-lint has changed
      5. Check if actions/upload-artifact has changed
  3. Update the action versions if there are changes:
    1. Fork the AutoKey repository.
    2. Open the fork on GitHub or in a clone if you would like to work locally.
    3. Create the update_action_versions branch off of the master branch.
    4. Change to the update_action_versions branch.
    5. Open the .github/workflows directory.
    6. Update all instances of the action version numbers that have changed in any/all of the workflow files.
    7. Save and commit each updated file.
    8. Note the change(s) in the CHANGELOG.rst file.
    9. Save and commit the file.
    10. Do a pull request.
    11. Do the cleanup:
      1. Wait for an email message notifying you that an administrator has merged the pull request into the project.
      2. Open the merged pull request by clicking its link in that email message.
      3. Click the Delete branch button.

Update the Python versions

  1. Get the Python versions currently supported by GitHub:
    1. Go to the GitHub Actions Runner Images page.
    2. Scroll down to the Available Images section of the page.
    3. Open the page for the most-recent Ubuntu release (the top release listed) by clicking its Included Software link.
    4. Scroll down to the Cached Tools section.
    5. Scroll down to the Python section inside of that section.
    6. Jot down all of the Python versions listed inside of that section.
    7. Go back to the Available Images section of the GitHub Actions Runner Images page.
    8. Open the page for the lowest Ubuntu release that's not marked as deprecated by clicking its Included Software link.
    9. ️Scroll down to the Cached Tools section.
    10. ️Scroll down to the Python section inside of that section.
    11. ️Jot down all of the Python versions listed inside of that section.
    12. Combine the two lists that you made into one list of versions without any duplicates. This will be the list of current versions for you to use when checking and updating versions below.
  2. Check the Python versions:
    1. Check the build.yml file:
      1. Check if all instances of python-version: [ use the highest Python version.
        • For example: 3.12.9
      2. Check if the check-name line uses the highest Python version.
        • For example: 3.12.9
    2. Check the python-test.yml file:
      1. Check if all instances of python-version: [ use all the Python versions.
        • For example: ["3.8", "3.9", "3.10", "3.11", "3.12"]
    3. Check the setup.cfg file:
      1. Check if the envlist line uses all the Python versions.
        • For example: py38,py39,py310,py311,py312
    4. Check the setup.py file:
      1. Check if the if sys.version_info block uses the lowest Python version.
        • Example: (3, 8, 18)
      2. Check if the python_requires line uses the lowest Python version.
        • Example: 3.8
      3. Check if the Programming Language line uses the lowest Python version.
        • Example: 3.8
  3. Update the Python versions if there are changes:
    1. Fork the AutoKey repository.
    2. Open the fork on GitHub or in a clone if you would like to work locally.
    3. Create the update_python_versions branch off of the master branch.
    4. Change to the update_python_versions branch (this will be done for you automatically if you created the branch on GitHub).
    5. Open any or all of the files that need to be updated in the that branch of the fork.
    6. Update all instances of the Python version numbers that have changed in the file(s).
    7. Save and commit each updated file.
    8. Note the change(s) in the CHANGELOG.rst file.
    9. Save and commit the file.
    10. Do a pull request.
    11. Do the cleanup:
      1. Wait for an email message notifying you that an administrator has merged the pull request into the project.
      2. Open the merged pull request by clicking its link in that email message.
      3. Click the Delete branch button.

Notes

  • ️Workflows should be checked and updated regularly.
  • About the actions:
    • The Actions section of the AutoKey project contains files that are used to manages our workflows.
    • The AutoKey project uses actions in its GitHub workflows to automate tasks when specific conditions are met (think of this kind of like GitHub's version of AutoKey).
    • ️Most actions can be found in the collection of GitHub-provided and user-provided actions in the GitHub Marketplace or in the Python Package Index.
    • The most-recent copy of the workflow files can be found on the master branch. The pages.yml file can be found only on the master branch. When creating a new AutoKey release, all of the workflow files will need to be copied from the master branch to the branch that will be overwriting it as part of the release process
    • About the workflow files:
      • The pages.yml file contains actions that create AutoKey's legacy documentation pages.
      • The python-test.yml file contains actions that run tests (like the ones that run whenever pull requests are made).
      • The build.yml file contains actions that run when AutoKey is built.
  • About the Python versions:
    • A couple of workflow files and a couple of setup scripts specify the Python versions used by the AutoKey project for build, development, tests, and support.
    • AutoKey uses the Python version range that GitHub supports for all supported (non-deprecated) Ubuntu releases. You can always find that version range in the Python section inside of the Cached Tools section found in the Included Software link for each Ubuntu release on GitHub's runner-images page.
    • Although GitHub is good about not including EOL Python versions in the runner images, it can be helpful to verify that by checking which Python versions are EOL on the Status of Python versions page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment