GithubHelp home page GithubHelp logo

publishtocentraltemplate's Introduction

Publish to Maven Central using Gradle and Github Actions

This repo contains a template gradle buildscript and workflow. The workflow can basically be copy-pasted.

I tried to remove anything that is not required and make it as minimal as possible.

How to use with Github actions:

  1. Setup the following repository secrets on github:
  • GPG_SECRET_KEY: Output of the gpg --export-secret-keys -a <key-id> command
  • GPG_SECRET_KEY_PASSWORD: Password of the used key
  • SONATYPE_USERNAME: Username for Sonatype
  • SONATYPE_PASSWORD: Password for Sonatype
  1. When pushing a commit it will automatically publish to Maven Central

How to use without Github actions:

  1. Setup gradle.properties like this and make sure you have the gpg key imported:
signing.gnupg.passphrase=Password for used key (Optional)
sonatypeUsername=Username for Sonatype
sonatypePassword=Password for Sonatype
  1. run ./gradlew publish closeAndReleaseStagingRepository

In both cases you should be able to access the published dependency after about 30 minutes

publishtocentraltemplate's People

Contributors

nottamion avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.