Skip to content
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

ci: Get and update primer primitives automatically #253

Merged
merged 7 commits into from
May 23, 2023

Conversation

tmillr
Copy link
Member

@tmillr tmillr commented May 16, 2023

Introduce a GitHub workflow which runs on a schedule 3 times per week to pull in all of the exact color definitions for each theme directly from the @primer/primitives npm package. This pr adds a package.json file for clarity and for dependency tracking/declarations, as well as a new workflow file which is quite simple and uses npm. The workflow goes something like this:

  1. Install the latest version of the @primer/primitives npm package in CI
  2. Extract the color definition JSON files for each theme
  3. Convert each JSON file to Lua, so that they can easily be required
  4. Place these new Lua files under the new directory lua/github-theme/palettes/primitives
  5. Run make fmt to format all Lua files
  6. Use/run the peter-evans/create-pull-request@v5 gh action, which will create a pr if there were any updates/changes

These color definitions will live under the new directory lua/github-theme/palettes/primitives and may be required from Lua at runtime (e.g. in order to build up specs).

The workflow may also be run manually via workflow_dispatch.

@tmillr tmillr mentioned this pull request May 16, 2023
9 tasks
@tmillr tmillr marked this pull request as ready for review May 16, 2023 17:11
@ful1e5
Copy link
Member

ful1e5 commented May 18, 2023

@tmillr, I'm getting ready to launch a major version of this colorscheme, which will be released soon. Once it's out, I'll review your pull requests (PRs) and merge them into the main branch. This approach will give us a solid base version that incorporates the newly added feature and allows us to track any additional modifications you mentioned. It will facilitate easier identification and monitoring of changes, enabling us to release minor versions accordingly.

Thank you for your understanding.

@tmillr
Copy link
Member Author

tmillr commented May 18, 2023

@tmillr, I'm getting ready to launch a major version of this colorscheme, which will be released soon. Once it's out, I'll review your pull requests (PRs) and merge them into the main branch. This approach will give us a solid base version that incorporates the newly added feature and allows us to track any additional modifications you mentioned. It will facilitate easier identification and monitoring of changes, enabling us to release minor versions accordingly.

Thank you for your understanding.

Awesome sounds good!

Copy link
Member

@ful1e5 ful1e5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bump version to 1.0.0

package.json Outdated Show resolved Hide resolved
@tmillr tmillr requested a review from ful1e5 May 22, 2023 16:43
@tmillr tmillr marked this pull request as draft May 23, 2023 03:56
@tmillr tmillr marked this pull request as ready for review May 23, 2023 04:32
@tmillr
Copy link
Member Author

tmillr commented May 23, 2023

I ran/tested the embedded shell script locally and then was able to successfully require() the generated Lua files. It should be all good to go!

@ful1e5 ful1e5 merged commit 20a949d into projekt0n:main May 23, 2023
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.

None yet

2 participants