A template repository for creating and publishing organisational standards using Typeflows and GitHub Packages.
- Use this template: Click "Use this template" to create your own standards repository
- Customise standards: Modify the files in
src/main/resources/to match your organisation's standards - Publish: Create a tag to automatically publish to GitHub Packages
git tag v1.0.0
git push origin v1.0.0That's it! Your standards package will be automatically published to GitHub Packages.
This template publishes a JAR containing your organisational standards files that other projects can consume. The standards are packaged as resources and can be extracted using Typeflows.
Add the GitHub Packages repository and dependency to your build.gradle.kts:
repositories {
maven {
url = uri("https://maven.pkg.github.com/YOUR_ORG/YOUR_REPO")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
dependencies {
implementation("YOUR_ORG:standards:VERSION")
}The standards files are located in src/main/resources/org/http4k/Http4kProjectStandards/typeflows/Http4kProjectStandards/.
Modify these files to match your organisation's standards:
.editorconfig- Editor configuration.gitignore- Git ignore patterns.java-version- Java version specificationgradle/- Gradle wrapper files- And any other standard files your projects need
Releases are fully automated using the included release script:
# Release a new version (must be on main branch with clean working directory)
./release.sh 1.2.0
# Release a pre-release version
./release.sh 2.0.0-beta.1The release script will:
- Validate: Check semver format and git status
- Confirm: Show what will happen and ask for confirmation
- Tag: Create and push the version tag
- Trigger: GitHub Actions automatically builds and publishes
- Release: Creates GitHub release with installation instructions
- Zero Configuration: Works out of the box with GitHub's built-in
GITHUB_TOKEN - Automatic Publishing: Publishes to GitHub Packages on tag creation
- No Signing Required: GitHub Packages handles authentication
- Environment Aware: Uses GitHub environment variables for organisation/repository detection
- Template Ready: Designed to be cloned and customized
The template automatically configures:
- Group ID: Uses your GitHub organisation name
- Artifact ID: Uses your repository name
- Version: Extracted from the git tag (removes 'v' prefix if present)
The workflow requires these permissions (automatically granted):
contents: write- For creating GitHub releasespackages: write- For publishing to GitHub Packages
The published package includes:
io.typeflows:typeflows-github- For GitHub integrationio.typeflows:typeflows-github-marketplace- For GitHub Actions marketplace integration
Published packages appear in:
- Your repository's "Packages" tab
- GitHub's package registry at
https://github.com/YOUR_ORG/YOUR_REPO/packages - Can be consumed by any project with appropriate GitHub token permissions
- Java 21+
- Gradle 8+
- GitHub repository with Actions enabled
- Public repository (for free GitHub Packages) or GitHub Pro/Teams for private repositories
- Ensure the tag follows the
v*pattern (e.g.,v1.0.0) - Check the Actions tab for workflow execution logs
- Verify repository has packages permission enabled
- Ensure you have a GitHub token with
read:packagespermission - Verify the repository/organisation name in the Maven URL
- Check your credentials configuration
- Ensure your GitHub token has appropriate permissions
- For private repositories, ensure you have access to both the repo and packages
This template is provided under the Apache-2.0 license. Customise as needed for your organisation.