We welcome contributions to this project by both internal and external parties
- Fork the repository into your own github account (external contributors) or create a new branch (internal contributions)
- Make your code changes
- Ensure you commit message is descriptive as it acts as the changelog. Mark any breaking changes with
BREAKING
. Include a rectification strategy if you introduce aBREAKING
change. - Ensure
README.md
is updated if needed. All code samples in the README should have corresponding (actual sames) in the various docs/ folders - Submit a pull request back to
master
branch (or the branch you are contributing to) - Ensure Github Actions build passes
- Await reviews
- Once merged into
master
aSNAPSHOT
build will be available for consumption immediately here. Note that snapshots change regularly and cannot be relied upon. - Hard Releases will be made once enough features have been added.
./gradlew spotlessApply shadowJar
./gradlew publishToMavenLocal
Ensure you add mavenLocal()
to your consuming project and the dependency verison matches that in your local .m2
folder
see .github/workflows/release.yml
Gradle release plugin is not currently working so this is a manual process at the moment.
- copy the GPG Private key into a file
private.key
- run
gpg --import private.key
cd ~/.gnupg
gpg -k
gpg --export-secret-key YOUR_KEY_ID > ~/.gnupg/secring.gpg
- Create a tag
X.X.X
- Update
gradle.properties
and remove-SNAPSHOT
from the version number - Check this file into version control and push the branch to the remote
- run
export SONAR_USERNAME=?
export SONAR_PASSWORD=?
export GPG_KEY_ID=?
export GPG_KEY_PASSPHRASE=?
export PATH_TO_SECRING_GPG=~/.gnupg/secring.gpg
# I found shadowed classes are not included if you don't separate the gradle operations
./gradlew clean shadowJar
./gradlew signArchives uploadArchives -PossrhUsername=${SONAR_USERNAME} -PossrhPassword=${SONAR_PASSWORD} -Psigning.keyId=${GPG_KEY_ID} -Psigning.password=${GPG_KEY_PASSPHRASE} -Psigning.secretKeyRingFile=${PATH_TO_SECRING_GPG}
Releasing Full Tutorial
- Login to SONAR (https://oss.sonatype.org)
- Click 'Staging Repositories' and locate the 'iogithuborigin-energy' bundle
- Review artifacts are correct in the 'Content' tab
- Press the 'Close' and give a reason such as "Jack Matthews - Confirmed artifacts are OK"
- Wait for about 1 min and press the 'Refresh button', if all sanity checks have passed the 'Release' button will be visible
- Press the 'Release' button and give a reason for releasing
- Objects should be available in about 10 min (Longer for search.maven.org)
- Checkout master branch
- Increment version number in
gradle.properties
- Create pull request for merge