8000 Add some scripts to be used in GH Actions by simoncozens · Pull Request #528 · googlefonts/gftools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add some scripts to be used in GH Actions #528

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 30, 2022

Conversation

simoncozens
Copy link
Contributor

The idea here is that there are certain (complex) steps we need to perform as part of GitHub actions in the googlefonts-project-template repo. If those steps lived in the googlefonts-project-template repo itself, we would lose control over the ability to maintain them, as they would be forked into all of the downstream repos. But if the code to perform those steps is part of gftools, then we can roll out updates just by doing another gftools release. The GitHub actions don't use the venv (because that's used for font building and is frozen, so that won't get updates either); instead they explicitly grab the latest version of gftools and run the actions outside the venv. So they're always up to date as of when the Action is run.

The scripts I've added are:

  • checkgooglefonts: Very simple - reads the config.yaml and sets a GH Actions workflow context if config["googleFonts"] is true (i.e. if this font is intended to be onboarded to GF.)
  • checkversionbump: This one is not so simple. It checks whether the version of the font in the font source files is greater than the last tagged release; i.e. if the font has been bumped since the last release was created, and therefore if a new release is needed. It sets GH Actions workflow contexts to indicate if a new release is needed and if so what version number / tag it should be.
  • notobuilder: This is a subclass of gftools builder which I'm planning to use as part of the Noto build process. It's not plugged into anything yet; that's the next piece of the puzzle but I wanted to get the onboarding stuff working first.
  • qa2issue: This takes a fontbakery report and a version number. It then looks on Github for an issue related to the version; if there is not one, it creates one, and if there is one, it adds the report as a comment. This ensures that each font version gets one single QA issue, so that the user does not get spammed with new issues for each commit.
  • updateupstream: This updates an upstream.yaml from a GitHub release, generating one if there isn't one in the repo already.

Note that this introduces a new schema key to config.yaml

@m4rc1e
Copy link
Collaborator
m4rc1e commented Mar 30, 2022

Thanks!

@m4rc1e m4rc1e merged commit 914be1e into googlefonts:main Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0