Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.
/ mill-plugin.g8 Public archive

A g8 template for creating Mill plugins.

License

Notifications You must be signed in to change notification settings

ckipp01/mill-plugin.g8

Repository files navigation

An opinionated Giter8 template for For Mill plugins.

This template is meant to get you up and running quickly when wanting to make a Mill plugin, test it, have CI for it (on GitHub), and release it (Maven Central). It's basically the setup I personally use and got annoyed creating it from scratch each time. This template includes the following:

NOTE: By default this template sets your license as Apache 2.0. If you don't want this you'll need to update your LICENSE file.

Using the template

You can use this template to generate a new project with g8 or with Mill.

Usage with g8

g8 ckipp01/mill-plugin.g8

Usage with Mill

mill -i init ckipp01/mill-plugin.g8

Once your've created your project you should be able to cd into it and get started! The project is already set up to have a working integration test executable with mill itest to give you an example.

NOTE: Because this is using mill-ci-release and therefore mill-vcs-version it expects your workspace to be a git repository. You'll need to do a git init prior to running mill itest or you'll see a failure about your workspace not being a git repository.

Publishing your plugin

When you're ready to publish your plugin the GitHub workflow is already present in the release.yml. However, it expects a few things to be set up before publishing. It will need the following 4 secrets added to your repository:

  • PGP_SECRET (base64 encoded)
  • PGP_PASSPHRASE
  • SONATYPE_USERNAME
  • SONATYPE_PASSWORD

If you're unfamiliar with publishing process to Maven Central you can read a bit more about it in the mill-ci-release README and also here on the Scala Website which explains a bit more about how to get an account set up and keys created. Note that the examples use sbt, so ignore the build-tool specific stuff and focus on the steps up to that point.

About

A g8 template for creating Mill plugins.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project