diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml
index 83b22aa..8ac4880 100644
--- a/.github/workflows/maven-publish.yml
+++ b/.github/workflows/maven-publish.yml
@@ -19,13 +19,17 @@ jobs:
with:
java-version: '11'
distribution: 'temurin'
- server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
+ server-id: central
+ server-username: MAVEN_CENTRAL_USERNAME # env variable for username in deploy
+ server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
+ gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
+ gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- - name: Build with Maven
- run: mvn -B package --file pom.xml
-
- - name: Publish to GitHub Packages Apache Maven
- run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
+ - name: Publish to Maven Central
+ run: mvn clean deploy -s $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_TOKEN: ${{ github.token }}
+ MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
+ MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
+ MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
diff --git a/README.md b/README.md
index a0bf36e..9efa465 100644
--- a/README.md
+++ b/README.md
@@ -16,61 +16,21 @@ This provider will work with Java 11 and above.
### Installation
-The Octopus OpenFeature provider for Java is currently published to [GitHub Packages](https://github.com/OctopusDeploy/openfeature-provider-java/packages/2528379). It will be published to the Maven Central repository soon.
-
-To add Maven package dependencies from GitHub Packages, you will need to add a Maven repository (in either your `settings.xml` or `pom.xml`), and create a GitHub Personal Access Token (classic) with `read:packages` scope, and configure this to be used to authenticate. An example `settings.xml` is shown below:
-
-```xml
-
-
-
- github
-
-
-
-
- github
-
-
- central
- https://repo1.maven.org/maven2
-
-
- github
- https://maven.pkg.github.com/OctopusDeploy/openfeature-provider-java
-
- true
-
-
-
-
-
-
-
-
- github
- USERNAME
- TOKEN
-
-
-
-```
-Read the GitHub docs for more information on [working with GitHub Packages as a Maven registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry#authenticating-to-github-packages).
-
-Once this is configured, you can add the Octopus OpenFeature provider as a dependency. The Maven example is shown below.
-
+The Octopus OpenFeature provider for Java is available as a [Maven package](https://central.sonatype.com/artifact/com.octopus.openfeature/octopus-openfeature-provider). You can add it to your project using your dependency manager (e.g. Maven or Gradle).
```xml
com.octopus.openfeature
octopus-openfeature-provider
- 0.1.0
+ 0.2.0
```
+```groovy
+implementation group: 'com.octopus.openfeature', name: 'octopus-openfeature-provider', version: '0.2.0'
+// Use current version number
+```
+
### Usage
```java
diff --git a/pom.xml b/pom.xml
index 3285b97..e1aa131 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,19 +6,95 @@
com.octopus.openfeature
octopus-openfeature-provider
- 0.2.0
+ 0.3.0-SNAPSHOT
jar
Octopus Deploy OpenFeature Provider
The Octopus Deploy provider for OpenFeature
https://octopus.com/docs/feature-toggles
+
+
+ Apache License, Version 2.0
+ https://www.apache.org/licenses/LICENSE-2.0.html
+
+
+
+
+
+ Michael Richardson
+ michael.richardson@octopus.com
+ Octopus Deploy
+ https://octopus.com
+
+
+
11
11
UTF-8
-
+
+
+ https://github.com/OctopusDeploy/openfeature-provider-java
+
+
+
+
+
+ org.sonatype.central
+ central-publishing-maven-plugin
+ 0.8.0
+ true
+
+ central
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 3.3.1
+
+
+ attach-sources
+ verify
+
+ jar-no-fork
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.11.2
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 3.2.7
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+
+
+