Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
cdivitotawela committed May 16, 2024
1 parent 939926b commit 5adc3a5
Showing 3 changed files with 15 additions and 4 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -23,9 +23,16 @@ jobs:
- name: Build
run: |
mkdir ~/.m2 && cp m2/settings.xml ~/.m2/settings.xml
mvn verify
mvn deploy
env:
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: Save artifact
uses: actions/upload-artifact@v4
with:
name: central-bundle
path: ${{ github.workspace }}/target/central-publishing/central-bundle.zip


6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -77,4 +77,8 @@ GitHub action requires GPG private key and passphrase in GitHub action secrets.
|`GPG_BASE64_KEY` | base64 encoded private key `gpg --export-secret-key -a > private.key` |
|`GPG_PASSPHRASE` | gpg key passphrase |
|`CENTRAL_USERNAME`| central username obtained via central portal |
|`CENTRAL_PASSWORD`| central password obtained via central portal |
|`CENTRAL_PASSWORD`| central password obtained via central portal |


## References
- https://central.sonatype.org/publish/publish-portal-maven/
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
<artifactId>example</artifactId>

<packaging>jar</packaging>
<version>1.0.4</version>
<version>1.0.5</version>
<name>example</name>
<description>Example project to check publish to central</description>
<url>http://maven.apache.org</url>
@@ -33,7 +33,7 @@
<developerConnection>scm:git:ssh://github.com:cdivitotawela/example-publish-maven-central.git</developerConnection>
<url>https://github.com/cdivitotawela/example-publish-maven-central</url>
</scm>

<dependencies>
<dependency>
<groupId>junit</groupId>

0 comments on commit 5adc3a5

Please sign in to comment.